Está en la página 1de 15

Sub Num_prot()

Dim h As Integer
Dim Num_prot As Integer
Num_prot = 459
For h = 5 To 125
If h = 55 Then
h=h+1
End If
If h = 91 Then
h=h+1
End If

Worksheets(h).Cells(5, 11) = Num_prot


Num_prot = Num_prot + 1
Next h
End Sub

Sub Tec_corpac()
Dim h As Integer

Dim tec_corp As String


tec_corp = "TECNICO CORPAC:"
For h = 5 To 125
Worksheets(h).Cells(11, 9) = tec_corp
Next h
End Sub

Sub Nom_tec()
Dim h As Integer
For h = 5 To 125
Worksheets(h).Cells(11, 11) = "IVAN TALAVERA"
Worksheets(h).Cells(12, 11) = "FELIZ GONZALES"
Worksheets(h).Cells(13, 11) = "PERCY CASTRO"
Next h
End Sub

Sub Temp()

Dim h As Integer
For h = 5 To 123
Worksheets(h).Cells(21, 13) = "16-20 C"
Next h
End Sub

Sub Suelo_S_H()
Dim h As Integer
For h = 5 To 39
Worksheets(h).Cells(23, 13) = "X"
Worksheets(h).Cells(25, 13) = " "

Next h
End Sub

Sub Centrar()
Dim h As Integer
For h = 5 To 55
Worksheets(h).Select

Range("M23").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Next h
End Sub

Sub Insert_col()

Dim h As Integer
For h = 6 To 14
Worksheets(h).Select
Columns("A:A").Select
Selection.Insert Shift:=xlToRight,
CopyOrigin:=xlFormatFromLeftOrAbove
Range("C4").Select
Next h
End Sub

Sub Agrandar_marco()
Dim h As Integer
For h = 6 To 14
Worksheets(h).Select
Range("B1:O64").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)

.LineStyle = xlDouble
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThick
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlDouble
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThick
End With
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
With Selection.Borders(xlEdgeRight)
.LineStyle = xlDouble
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThick
End With
Range("B1:O72").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlDouble
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThick

End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlDouble
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThick
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlDouble
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThick
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlDouble
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThick
End With
Range("A1").Select
Next h
End Sub

Sub Insert_col()

Dim h As Integer
For h = 5 To 14
Worksheets(h).Select
Columns("A:A").Select
Selection.Insert Shift:=xlToRight,
CopyOrigin:=xlFormatFromLeftOrAbove
Range("C4").Select
Next h
End Sub

Sub Agrandar_marco()
Dim h As Integer
For h = 5 To 14
Worksheets(h).Select
Range("B1:O64").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlDouble

.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThick
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlDouble
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThick
End With
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
With Selection.Borders(xlEdgeRight)
.LineStyle = xlDouble
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThick
End With
Range("B1:O72").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlDouble
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThick
End With

With Selection.Borders(xlEdgeTop)
.LineStyle = xlDouble
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThick
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlDouble
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThick
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlDouble
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThick
End With
Range("A1").Select
Next h
End Sub

Sub Nom_firmas()

Dim h As Integer
For h = 5 To 14
Worksheets(h).Cells(63, 3) = " "
Worksheets(h).Cells(63, 7) = " "
Worksheets(h).Cells(63, 11) = " "
Worksheets(h).Cells(68, 3) =
"__________________________________"
Worksheets(h).Cells(68, 7) =
"__________________________________"
Worksheets(h).Cells(68, 11) = "_________________________"
Worksheets(h).Cells(69, 3) = "CONSORCIO SOLUCIONES NET
DATA SAC"
Worksheets(h).Cells(69, 7) = "CONSORCIO SOLUCIONES NET
DATA SAC"
Worksheets(h).Cells(69, 11) = "

CORPAC"

Worksheets(h).Cells(70, 3) = "
SRL"

C&T INDUSTRIAL

Worksheets(h).Cells(70, 7) = "
SRL"

C&T INDUSTRIAL

Worksheets(h).Cells(71, 4) = " VoBo G.G."


Next h
End Sub

Sub Logo_corpac()

Dim h As Integer
For h = 5 To 14
Worksheets(h).Select
Range("C2").Select
ActiveSheet.Pictures.Insert("C:\Users\niko\Desktop\2.jpg").Select
Selection.ShapeRange.ScaleWidth 0.54, msoFalse,
msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 0.54, msoFalse,
msoScaleFromTopLeft
Range("L2").Select
ActiveSheet.Pictures.Insert("C:\Users\niko\Desktop\1.jpg").Select
Selection.ShapeRange.ScaleWidth 0.54, msoFalse,
msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 0.54, msoFalse,
msoScaleFromTopLeft
Range("G12").Select
Next h
End Sub

Sub Copiar_Img_celda_Pegar()

Worksheets(1).Select
Cells(8, 7).Select
Selection.Copy
Worksheets(5).Select
Cells(10, 18).Select
ActiveSheet.Paste
End Sub

Sub Nuevo_Logo_corpac()
Dim h As Integer
Dim Fotos As Object
Dim ruta1 As String
Dim ruta2 As String

ruta1 = "C:\Users\niko\Desktop\1.jpg"
ruta2 = "C:\Users\niko\Desktop\2.jpg"
for h = 5 to 50
Worksheets(h).Select
Range("C2").Select
Set Fotos = ActiveSheet.Shapes.AddPicture(Filename:=ruta2,
_
linktofile:=msoFalse, savewithdocument:=msoCTrue, _
Left:=0, Top:=0, Width:=-1, Height:=-1)

Set r1 = Cells(2, "C")


r1.Select
With Fotos
.Top = r1.Top
.Width = .Width / 1.5
.Height = .Height / 1.5
.Left = r1.Left
r1.EntireRow.RowHeight = .Height
.Placement = xlMoveAndSize
End With

Range("K2").Select
Set Fotos = ActiveSheet.Shapes.AddPicture(Filename:=ruta1,
_
linktofile:=msoFalse, savewithdocument:=msoCTrue, _
Left:=0, Top:=0, Width:=-1, Height:=-1)
Set r1 = Cells(2, "K")
r1.Select
With Fotos
.Top = r1.Top
.Width = .Width / 1.5
.Height = .Height / 1.5
.Left = r1.Left

r1.EntireRow.RowHeight = .Height
.Placement = xlMoveAndSize
End With
Range("G12").Select
Next h
End Sub

Sub Borra_imagenes()
Dim h As Integer
For h = 5 To 32
Worksheets(h).Select
ActiveSheet.Pictures.Select
Selection.Delete
Next h
End Sub

También podría gustarte