Guau!!, gracias por tu inmediata respuesta. No tengo ningún problema con el genero, eres muy amable.
Referente al tema que nos ocupa, no sé que estoy haciendo mal, soy un principiante así que te mando las macros de mi listbox para que me ayudes a comprender mejor, al final esta la macro que me sugeriste, hago de tu conocimiento que uso excel 2013, gracias por tu ayuda..
Private Sub CbtEliminar_Click()
Pregunta = MsgBox("Estás seguro de eliminar el registro?", vbYesNo + vbQuestion, "FACTURAS") If Pregunta <> vbNo Then FILA = Me.ListBox1.ListIndex + 2 Rows(FILA).Delete Application.ScreenUpdating = True End If End Sub
Private Sub CbtModificar_Click() If Me.ListBox1.ListIndex < 0 Then MsgBox "No se ha elegido ningún registro", vbExclamation, "SELECCIONE UN REGISTRO" Else UFmodificar.Show End If End Sub
Private Sub ComboBoxCODIGO_Enter() Application.ScreenUpdating = False ComboBoxCODIGO.Clear Sheets("EQUIPO").Select Range("A3").Select Do While Not IsEmpty(ActiveCell) ComboBoxCODIGO.AddItem ActiveCell.Value ActiveCell.Offset(1, 0).Select Loop End Sub
Private Sub CommandButtonCONSUL_Click() Application.ScreenUpdating = False Sheets("EQUIPO").Activate
FILTRAEQUIPAMIENTO
End Sub
Private Sub CommandButtonLIMP_Click()
Range("CODOBRA").ClearContents Range("EQUIPADO").ClearContents
End Sub
Private Sub CommandButtonREPOR_Click() Application.ScreenUpdating = False Sheets("BASE 2010").Range("EQUIPADO").PrintOut 1, 1
End Sub
Private Sub UserForm_Initialize() Application.ScreenUpdating = False Sheets("BASE 2010").Select ComboBoxCODIGO.ControlSource = "CODOBRA" ListBox1.RowSource = "EQUIPADO" End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) OBRAS_EQUIPADAS.Hide UserForm1.Show End Sub
Private Sub ListBox1_Click() FILA = Me.ListBox1.ListIndex + 2 For i = 1 To 19 Cells(FILA, 1).Activate Next i End Sub
Dim total As Double
For i = 0 To ListBox1.listitem total = total + CDbl(ListBox1.List(i, 17)) Next
TextBox1 = total
End Sub
Y si la columna tiene formato de moneda como lo sumo?? - erik varela