¿Cómo hago para repetir un rango dentro del condicional de un checkbox?
Como hago para poder repetir el rango qie he copiado luego de haber llamado a el rango de otra hoja repetitivamente, después de intentar individualmente, los checkbox funciona pero cuando selecciono los 2 primeros, me salen los datos incompletos
Private Sub CommandButton1_Click()
'Asignando Objetos de busqueda y hojas
Set h1 = Sheets("Plan MP")
Set b = h1.Columns("B").Find(TextBox1, lookat:=xlWhole)
u2 = h1.Range("B" & Rows.Count).End(xlUp).Row + 1
'Asignando condicional de validacion de codigo
If TextBox1.Value = Empty Or TextBox2 = Empty Or TextBox3 = Empty Then
MsgBox " Asegurese de rellenar todos los casilleros ", vbCritical, "ATENCION !"
Unload Me
Load MP
MP.Show
Exit Sub
End If
If Not b Is Nothing Then
MsgBox " Este codigo ya esta registrado "
End If
'
If box1.Value = True Then
h1.Range("B2:AY8").Copy
h1.Range("B" & u2).PasteSpecial Paste:=xlValues
u1 = h1.Range("B" & Rows.Count).End(xlUp).Row + 1
Call Copiar_Rango(h1, "B4:AZ7", 3)
For i = 1 To 9
h1.Cells(u2, "B") = Me.TextBox1.Value
h1.Cells(u2, "B").Interior.Color = RGB(255, 255, 0)
h1.Cells(u2, "D") = Me.TextBox2.Value
h1.Cells(u2, "D").Interior.Color = RGB(255, 255, 0)
h1.Cells(u2, "F") = Me.TextBox3.Value
h1.Cells(u2, "F").Interior.Color = RGB(255, 255, 0)
u2 = u2 + 1
Next i
End If
If box2.Value = True Then
h1.Range("B2:AY8").Copy
h1.Range("B" & u2).PasteSpecial Paste:=xlValues
Call Copiar_Rango(h1, "B8:AZ11", 3)
For i = 1 To 9
h1.Cells(u2, "B") = Me.TextBox1.Value
h1.Cells(u2, "B").Interior.Color = RGB(255, 255, 0)
h1.Cells(u2, "D") = Me.TextBox2.Value
h1.Cells(u2, "D").Interior.Color = RGB(255, 255, 0)
h1.Cells(u2, "F") = Me.TextBox3.Value
h1.Cells(u2, "F").Interior.Color = RGB(255, 255, 0)
u2 = u2 + 1
Next i
End If