Aclaración de la línea de código VBA crear línea
Para Dante amor
H o l a Dante buen día necesito entender la lógica de cada línea del código que funciona perfecto.
Solo entendí donde puse los apostrofes.
G r a c i a s Dante
Sub Lineas()
'Por.Dante Amor
'Borrando líneas anteriores
' For Each s In ActiveSheet.Shapes
' If s.Name = "milineacreada" Then
' s.Delete
' End If
' Next
' '
' Set r = Range("B:B, G:G")
' Set b = r.Find("CALIF", lookat:=xlWhole)
' If Not b Is Nothing Then
' celda = b.Address
Do
'Creando líneas
If Cells(b.Row + 1, b.Column) = "" Then
Set r1 = Cells(b.Row + 1, b.Column)
fila = b.Row + 1
Do While Cells(fila, b.Column - 1) <> ""
fila = fila + 1
Loop
Set r2 = Cells(fila, b.Column + 2)
Set linea = ActiveSheet.Shapes.AddLine(r1.Left, r1.Top, r2.Left, r2.Top)
linea.Name = "milineacreada"
End If
Set b = r.FindNext(b)
Loop While Not b Is Nothing And b.Address <> celda
End If
End Sub
1 Respuesta
Respuesta de Dante Amor
1