Formulario no funciona presenta error en uno de los códigos
Hola, tengo un formulario que presenta un error en un código y no deja cargar la información, creo que tiene que ver con el tema de los tidpos de datos o variables que uso, pero no he podido arreglarlo, presenta error en cargarlista
Private Sub cmd_Eliminar_Click()
Dim fLote As Integer
fLote = nLote(cbo_numer.Value)
If fLote = 0 Then
MsgBox "El Lote que usted quiere eliminar no existe", vbInformation + vbOKOnly
cbo_numer.SetFocus
Exit Sub
End If
If MsgBox("¿Seguro que quiere eliminar este Lote?", vbQuestion + vbYesNo) = vbYes Then
Cells(fLote, 1).Select
ActiveCell.EntireRow.Delete
LimpiarFormulario
MsgBox "Lote eliminado", vbInformation + vbOKOnly
cbo_numer.SetFocus
End If
End Sub
Private Sub cmd_Cerrar_Click()
End
End Sub
Private Sub cbo_numer_Change()
On Error Resume Next
If nLote(cbo_numer.Value) <> 0 Then
Sheets("Lotes").Activate
Cells(cbo_numer.ListIndex + 2, 1).Select
txt_Cajon = ActiveCell.Offset(0, 1)
txt_Participe = ActiveCell.Offset(0, 2)
txt_Procedencia = ActiveCell.Offset(0, 3)
txt_Genero = ActiveCell.Offset(0, 4)
txt_FechaInicio = ActiveCell.Offset(0, 5)
txt_EdadInicio = ActiveCell.Offset(0, 6)
txt_Cerdosinicio = ActiveCell.Offset(0, 7)
txt_Pesoprominicio = ActiveCell.Offset(0, 8)
txt_Semeqinicio = ActiveCell.Offset(0, 9)
txt_fechafinal = ActiveCell.Offset(0, 10)
txt_Edadfinal = ActiveCell.Offset(0, 11)
txt_cerdosfinal = ActiveCell.Offset(0, 12)
txt_Pesopromfinal = ActiveCell.Offset(0, 13)
fotografia.Picture = LoadPicture("")
fotografia.Picture = LoadPicture(ActiveCell.Offset(0, 14))
ArchivoIMG = ActiveCell.Offset(0, 14)
Else
txt_Cajon = ""
txt_Participe = ""
txt_Procedencia = ""
txt_Genero = ""
txt_FechaInicio = ""
txt_EdadInicio = ""
txt_Cerdosinicio = ""
txt_Pesoprominicio = ""
txt_Semeqinicio = ""
txt_fechafinal = ""
txt_Edadfinal = ""
txt_cerdosfinal = ""
txt_Pesopromfinal = ""
ArchivoIMG = ""
fotografia.Picture = LoadPicture("")
End If
End Sub
Sub LimpiarFormulario()
CargarLista
cbo_numer = ""
txt_Cajon = ""
txt_Participe = ""
txt_Procedencia = ""
txt_Genero = ""
txt_FechaInicio = ""
txt_EdadInicio = ""
txt_Cerdosinicio = ""
txt_Pesoprominicio = ""
txt_Semeqinicio = ""
txt_fechafinal = ""
txt_Edadfinal = ""
txt_cerdosfinal = ""
txt_Pesopromfinal = ""
ArchivoIMG = ""
End Sub
Private Sub cmd_Imagen_Click()
On Error Resume Next
ArchivoIMG = Application.GetOpenFilename("Imágenes jpg,*.jpg,Imágenes bmp,*.bmp", 0, "Seleccionar Imágen para Reegistro de Lote")
fotografia.Picture = LoadPicture("")
fotografia.Picture = LoadPicture(ArchivoIMG)
End Sub