magoba
Board Regular
- Joined
- Aug 1, 2004
- Messages
- 71
- Office Version
- 2016
- Platform
- Windows
Saludos a Todos, tengo este codigo para un formulario al hacer click en el boton 2 me sale el error codigo 1004, el codigo en cuestion es el siguiente
Private Sub UserForm_initialize()
Dim combo_item As String
Application.ScreenUpdating = False
Sheets("DATOS").Select
Range("AB6").Select
Do While ActiveCell <> ""
combo_item = ActiveCell.Value
ComboBox1.AddItem combo_item
ActiveCell.Offset(1, 0).Select
Loop
Application.ScreenUpdating = True
End Sub
Private Sub CommandButton2_Click()
Application.ScreenUpdating = False
Sheets("DATOS").Select
Range("A30").Select
Selection.End(x1UP).Select AQUI SE DETIENE LA MACRO
ActiveCell.Offset(1, 0).Select
ActiveCell = ComboBox1.Value
ActiveCell.Offset(0.1).Select
Application.ScreenUpdating = True
End Sub
Private Sub CommandButton1_Click()
Range("A2").Select
ActiveWorkbook.Save
UserForm1.Hide
End Sub
Private Sub UserForm_initialize()
Dim combo_item As String
Application.ScreenUpdating = False
Sheets("DATOS").Select
Range("AB6").Select
Do While ActiveCell <> ""
combo_item = ActiveCell.Value
ComboBox1.AddItem combo_item
ActiveCell.Offset(1, 0).Select
Loop
Application.ScreenUpdating = True
End Sub
Private Sub CommandButton2_Click()
Application.ScreenUpdating = False
Sheets("DATOS").Select
Range("A30").Select
Selection.End(x1UP).Select AQUI SE DETIENE LA MACRO
ActiveCell.Offset(1, 0).Select
ActiveCell = ComboBox1.Value
ActiveCell.Offset(0.1).Select
Application.ScreenUpdating = True
End Sub
Private Sub CommandButton1_Click()
Range("A2").Select
ActiveWorkbook.Save
UserForm1.Hide
End Sub