¿Cómo introducir datos en determinadas celdas repetitivas mediante un textbox?
Que tal tengo una plantilla que mediante un userform configure el para que se copie y se repitan en un rango especifico el problema es que quiero que lo introducido que mediante el textbox 5 sea reemplazado por A001F02 de la celda AW2 y también en AW13, entonces cuando de el botón generar el código introducido sea mostrado en la celda AW21 y después AW33 así sucesivamente . Adjunto mi código
Private Sub CommandButton1_Click()
'Asignando Objetos de busqueda y hojas
Set h1 = Sheets("Hoja1")
Set b = h1.Columns("B").Find(TextBox1, lookat:=xlWhole)
'Asignando condicional de validacion de codigo
If Not b Is Nothing Then
MsgBox " Este codigo ya esta registrado ", vbCritical, "ATENCION !"
Unload Me
Load planbulkse
planbulkse.Show
'Condicional para ejecutar el codigo
Else
'codigo para la busqueda de datos
u1 = h1.Range("B" & Rows.Count).End(xlUp).Row + 1
u3 = h1.Range("B" & Rows.Count).End(xlUp).Row + 1
'Rangos de celdas para copiar y pegar
h1.Range("C2:C20").Copy
h1.Range("C" & u1).PasteSpecial Paste:=xlValues
h1.Range("E2:E20").Copy
h1.Range("E" & u1).PasteSpecial Paste:=xlValues
h1.Range("G2:AA20").Copy
h1.Range("G" & u1).PasteSpecial Paste:=xlValues
h1.Range("AC2:AV20").Copy
h1.Range("AC" & u1).PasteSpecial Paste:=xlValues
'Bucle para el coloreado de celdas
For i = 1 To 19
h1.Cells(u1, "B") = Me.TextBox1.Value
h1.Cells(u1, "B").Interior.Color = RGB(255, 255, 0)
h1.Cells(u1, "D") = Me.TextBox2.Value
h1.Cells(u1, "D").Interior.Color = RGB(255, 255, 0)
h1.Cells(u1, "F") = Me.TextBox3.Value
h1.Cells(u1, "F").Interior.Color = RGB(255, 255, 0)
h1.Cells(u1, "AB") = Me.TextBox4.Value
h1.Cells(u1, "AB").Interior.Color = RGB(255, 255, 0)
h1.Cells(u1, "AW").Interior.Color = RGB(255, 255, 0)
h1.Cells(u1, "AX").Interior.Color = RGB(255, 255, 0)
u1 = u1 + 1
Next i
'
h1.Range("B" & u3).Select
Application.CutCopyMode = False
Unload Me
Load planbulkse
planbulkse.Show
End If
Exit Sub
End Sub
Private Sub CommandButton2_Click()
Unload Me
Exit Sub
End Sub
Private Sub TextBox1_Change()
'Restriccion de 8 Digitos buscador
If Len(Me.TextBox1.Value) = 8 Then
Me.CommandButton1.Enabled = True
Else
Me.CommandButton1.Enabled = False
End If
Exit Sub
End Sub
Private Sub UserForm_Click()
End Sub

1 Respuesta
Respuesta de Dante Amor
1