UniversoExcelForo

Respuesta a consultas.
Fecha de creación: 09.Abril.2012

Fundadores: Wibly,Tyno,Servando,Sakkar,Rosendo2,RMaximo,Railar,Mcoronel,Ioyama,Igtelo,Hugotron,Drochar,Dedos,Alberto,Adolfo

No se pueden hacer consultas de Excel o VBA por mensaje privado.
Utiliza el botón buscar del foro y te ahorras tiempo para obtener "ayuda".

No estás conectado. Conéctate o registrate

Ver el tema anterior Ver el tema siguiente Ir abajo  Mensaje [Página 1 de 1.]

1 Error en formulario el 19/12/14, 02:49 am

csanpin


Estimados Muy buenas Noches el problema que tengo es el formulario de Busquedatengo un combobox2 el cual busca dentro de una hoja de excel por nombre, la primera vez en el primer registro marca bien, luego cojo cualquier registro y marca bien una y otra ves, pero cuando vuelvo a buscar el primer registro no me concuera la información buscada sol del primer registro se mueve de la celda a2 al celda g5 y de ahi busca la información

Muchas gracias por la ayuda Very Happy

Sub cargarut()
ComboBox2.Clear
Sheets("Base_de_datos").Activate
Range("a1").Select
For i = 1 To 100
If ActiveCell.Offset(i, 0).Value <> "" Then
ComboBox2.AddItem ActiveCell.Offset(i, 0).Value
End If
Next
End Sub
Sub carganombre()
ComboBox3.Clear
Sheets("Base_de_datos").Activate
Range("h1").Select
For i = 1 To 100
If ActiveCell.Offset(i, 0).Value <> "" Then
ComboBox3.AddItem ActiveCell.Offset(i, 0).Value
End If
Next
End Sub
Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
ComboBox2.Enabled = True
CheckBox2.Enabled = False
ComboBox3.Enabled = False
cargarut
Else
ComboBox2.Enabled = False
CheckBox2.Enabled = True
ComboBox2.Clear
End If
End Sub
Private Sub CheckBox2_Click()
If CheckBox2.Value = True Then
ComboBox3.Enabled = True
CheckBox1.Enabled = False
ComboBox2.Enabled = False
carganombre
Else
ComboBox3.Enabled = False
CheckBox1.Enabled = True
ComboBox3.Clear
End If
End Sub
Private Sub ComboBox2_Change()
Dim var2 As String
If ComboBox2 = "" Then
Else
CommandButton1.Locked = False
Sheets("Base_de_datos").Activate
If ComboBox2 = Empty Then
MsgBox "Para modificar primero seleccione REGISTRO", vbInformation, "ADUANA"
ComboBox2.ListIndex = 0
ComboBox2.SetFocus
End If

var2 = ComboBox2.Column(0)
Cells.Find(What:=ComboBox2.Value, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
        xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
        , SearchFormat:=False).Activate
       
 
    
If var2 = ActiveCell.Value Then

TextBox1.Value = ActiveCell.Value
TextBox1 = ActiveCell.Offset(0, 0)
TextBox2 = ActiveCell.Offset(0, 1)
TextBox3 = ActiveCell.Offset(0, 2)
TextBox4 = ActiveCell.Offset(0, 3)
TextBox5 = ActiveCell.Offset(0, 4)
TextBox62 = ActiveCell.Offset(0, 5)
TextBox6 = ActiveCell.Offset(0, 6)
TextBox7 = ActiveCell.Offset(0, 7)
TextBox8 = ActiveCell.Offset(0, Cool
TextBox9 = ActiveCell.Offset(0, 9)

TextBox10 = ActiveCell.Offset(0, 10)
TextBox11 = ActiveCell.Offset(0, 11)
TextBox12 = ActiveCell.Offset(0, 12)
TextBox13 = ActiveCell.Offset(0, 13)
TextBox14 = ActiveCell.Offset(0, 14)
TextBox15 = ActiveCell.Offset(0, 15)
TextBox16 = ActiveCell.Offset(0, 16)
TextBox17 = ActiveCell.Offset(0, 17)
TextBox18 = ActiveCell.Offset(0, 18)
TextBox19 = ActiveCell.Offset(0, 19)

TextBox20 = ActiveCell.Offset(0, 20)
TextBox21 = ActiveCell.Offset(0, 21)
TextBox22 = ActiveCell.Offset(0, 22)
TextBox23 = ActiveCell.Offset(0, 23)
TextBox24 = ActiveCell.Offset(0, 24)
TextBox25 = ActiveCell.Offset(0, 25)
TextBox26 = ActiveCell.Offset(0, 26)
TextBox27 = ActiveCell.Offset(0, 27)
TextBox28 = ActiveCell.Offset(0, 28)
TextBox29 = ActiveCell.Offset(0, 29)

TextBox30 = ActiveCell.Offset(0, 30)
TextBox31 = ActiveCell.Offset(0, 31)
TextBox32 = ActiveCell.Offset(0, 32)
TextBox33 = ActiveCell.Offset(0, 33)
TextBox34 = ActiveCell.Offset(0, 34)
TextBox35 = ActiveCell.Offset(0, 35)
TextBox36 = ActiveCell.Offset(0, 36)
TextBox37 = ActiveCell.Offset(0, 37)
TextBox38 = ActiveCell.Offset(0, 38)
TextBox39 = ActiveCell.Offset(0, 39)

TextBox40 = ActiveCell.Offset(0, 40)
TextBox41 = ActiveCell.Offset(0, 41)
TextBox42 = ActiveCell.Offset(0, 42)
TextBox43 = ActiveCell.Offset(0, 43)
TextBox44 = ActiveCell.Offset(0, 44)
TextBox45 = ActiveCell.Offset(0, 45)
TextBox46 = ActiveCell.Offset(0, 46)
TextBox47 = ActiveCell.Offset(0, 47)
TextBox48 = ActiveCell.Offset(0, 48)
TextBox49 = ActiveCell.Offset(0, 49)

TextBox50 = ActiveCell.Offset(0, 50)
TextBox51 = ActiveCell.Offset(0, 51)
TextBox52 = ActiveCell.Offset(0, 52)
TextBox53 = ActiveCell.Offset(0, 53)
TextBox54 = ActiveCell.Offset(0, 54)
TextBox55 = ActiveCell.Offset(0, 55)
TextBox56 = ActiveCell.Offset(0, 56)
TextBox57 = ActiveCell.Offset(0, 57)
TextBox58 = ActiveCell.Offset(0, 58)
TextBox59 = ActiveCell.Offset(0, 59)

TextBox60 = ActiveCell.Offset(0, 60)
TextBox61 = ActiveCell.Offset(0, 61)

TextBox2.Locked = False
TextBox3.Locked = False
TextBox4.Locked = False
TextBox5.Locked = False
TextBox6.Locked = False
TextBox7.Locked = False
TextBox8.Locked = False
End If
End If
End Sub
Private Sub ComboBox3_Change()
If ComboBox3 = "" Then
Else
CommandButton1.Locked = False
Sheets("Base_de_datos").Activate
If ComboBox3 = Empty Then
MsgBox "Para modificar primero seleccione proveedor", vbInformation, "Almacen"
ComboBox3.ListIndex = 0
ComboBox3.SetFocus
End If
var3 = ComboBox3.Column(0)
Cells.Find(What:=ComboBox3.Value, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
        xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
        , SearchFormat:=False).Activate
If var3 = ActiveCell Then

'TextBox2 = ActiveCell
'TextBox1 = ActiveCell.Offset(0, -1)
'TextBox3 = ActiveCell.Offset(0, 1)
'TextBox4 = ActiveCell.Offset(0, 2)
'TextBox5 = ActiveCell.Offset(0, 3)
'TextBox6 = ActiveCell.Offset(0, 4)
'TextBox7 = ActiveCell.Offset(0, 5)
'TextBox8 = ActiveCell.Offset(0, 6)
TextBox1.Value = ActiveCell.Value
TextBox1 = ActiveCell.Offset(0, 0)
TextBox2 = ActiveCell.Offset(0, 1)
TextBox3 = ActiveCell.Offset(0, 2)
TextBox4 = ActiveCell.Offset(0, 3)
TextBox5 = ActiveCell.Offset(0, 4)
TextBox62 = ActiveCell.Offset(0, 5)
TextBox6 = ActiveCell.Offset(0, 6)
TextBox7 = ActiveCell.Offset(0, 7)
TextBox8 = ActiveCell.Offset(0, Cool
TextBox9 = ActiveCell.Offset(0, 9)

TextBox10 = ActiveCell.Offset(0, 10)
TextBox11 = ActiveCell.Offset(0, 11)
TextBox12 = ActiveCell.Offset(0, 12)
TextBox13 = ActiveCell.Offset(0, 13)
TextBox14 = ActiveCell.Offset(0, 14)
TextBox15 = ActiveCell.Offset(0, 15)
TextBox16 = ActiveCell.Offset(0, 16)
TextBox17 = ActiveCell.Offset(0, 17)
TextBox18 = ActiveCell.Offset(0, 18)
TextBox19 = ActiveCell.Offset(0, 19)

TextBox20 = ActiveCell.Offset(0, 20)
TextBox21 = ActiveCell.Offset(0, 21)
TextBox22 = ActiveCell.Offset(0, 22)
TextBox23 = ActiveCell.Offset(0, 23)
TextBox24 = ActiveCell.Offset(0, 24)
TextBox25 = ActiveCell.Offset(0, 25)
TextBox26 = ActiveCell.Offset(0, 26)
TextBox27 = ActiveCell.Offset(0, 27)
TextBox28 = ActiveCell.Offset(0, 28)
TextBox29 = ActiveCell.Offset(0, 29)

TextBox30 = ActiveCell.Offset(0, 30)
TextBox31 = ActiveCell.Offset(0, 31)
TextBox32 = ActiveCell.Offset(0, 32)
TextBox33 = ActiveCell.Offset(0, 33)
TextBox34 = ActiveCell.Offset(0, 34)
TextBox35 = ActiveCell.Offset(0, 35)
TextBox36 = ActiveCell.Offset(0, 36)
TextBox37 = ActiveCell.Offset(0, 37)
TextBox38 = ActiveCell.Offset(0, 38)
TextBox39 = ActiveCell.Offset(0, 39)

TextBox40 = ActiveCell.Offset(0, 40)
TextBox41 = ActiveCell.Offset(0, 41)
TextBox42 = ActiveCell.Offset(0, 42)
TextBox43 = ActiveCell.Offset(0, 43)
TextBox44 = ActiveCell.Offset(0, 44)
TextBox45 = ActiveCell.Offset(0, 45)
TextBox46 = ActiveCell.Offset(0, 46)
TextBox47 = ActiveCell.Offset(0, 47)
TextBox48 = ActiveCell.Offset(0, 48)
TextBox49 = ActiveCell.Offset(0, 49)

TextBox50 = ActiveCell.Offset(0, 50)
TextBox51 = ActiveCell.Offset(0, 51)
TextBox52 = ActiveCell.Offset(0, 52)
TextBox53 = ActiveCell.Offset(0, 53)
TextBox54 = ActiveCell.Offset(0, 54)
TextBox55 = ActiveCell.Offset(0, 55)
TextBox56 = ActiveCell.Offset(0, 56)
TextBox57 = ActiveCell.Offset(0, 57)
TextBox58 = ActiveCell.Offset(0, 58)
TextBox59 = ActiveCell.Offset(0, 59)

TextBox60 = ActiveCell.Offset(0, 60)
TextBox61 = ActiveCell.Offset(0, 61)

TextBox9.Locked = True
TextBox10.Locked = True

TextBox11.Locked = True
TextBox12.Locked = True
TextBox13.Locked = True
TextBox14.Locked = True
TextBox15.Locked = True
TextBox16.Locked = True
TextBox17.Locked = True
TextBox18.Locked = True
TextBox19.Locked = True
TextBox20.Locked = True

TextBox21.Locked = True
TextBox22.Locked = True
TextBox23.Locked = True
TextBox24.Locked = True
TextBox25.Locked = True
TextBox26.Locked = True
TextBox27.Locked = True
TextBox28.Locked = True
TextBox29.Locked = True
TextBox30.Locked = True

TextBox31.Locked = True
TextBox32.Locked = True
TextBox33.Locked = True
TextBox34.Locked = True
TextBox35.Locked = True
TextBox36.Locked = True
TextBox37.Locked = True
TextBox38.Locked = True
TextBox39.Locked = True
TextBox40.Locked = True

TextBox41.Locked = True
TextBox42.Locked = True
TextBox43.Locked = True
TextBox44.Locked = True
TextBox45.Locked = True
TextBox46.Locked = True
TextBox47.Locked = True
TextBox48.Locked = True
TextBox49.Locked = True
TextBox50.Locked = True

TextBox51.Locked = True
TextBox52.Locked = True
TextBox53.Locked = True
TextBox54.Locked = True
TextBox55.Locked = True
TextBox56.Locked = True
TextBox57.Locked = True
TextBox58.Locked = True
TextBox59.Locked = True
TextBox60.Locked = True
TextBox61.Locked = True
TextBox62.Locked = True
End If
End If
End Sub
Private Sub CommandButton1_Click()
Sheets("Base_de_datos").Activate
If TextBox1 = "" Or TextBox2 = "" Or TextBox3 = "" Or TextBox4 = "" Then
MsgBox "Está dejando campos requeridos vacios favor complete", vbInformation, "Almacen"
TextBox2.SetFocus
Else
If CheckBox1.Value = True Then
ActiveCell = TextBox1.Value
ActiveCell.Offset(0, 0) = TextBox1.Value
ActiveCell.Offset(0, 1) = TextBox2.Value
ActiveCell.Offset(0, 2) = TextBox3.Value
ActiveCell.Offset(0, 3) = TextBox4.Value
ActiveCell.Offset(0, 4) = TextBox5.Value
ActiveCell.Offset(0, 5) = TextBox62.Value
ActiveCell.Offset(0, 6) = TextBox6.Value
ActiveCell.Offset(0, 7) = TextBox7.Value
ActiveCell.Offset(0, Cool = TextBox8.Value
ActiveCell.Offset(0, 9) = TextBox9.Value

ActiveCell.Offset(0, 10) = TextBox10.Value
ActiveCell.Offset(0, 11) = TextBox11.Value
ActiveCell.Offset(0, 12) = TextBox12.Value
ActiveCell.Offset(0, 13) = TextBox13.Value
ActiveCell.Offset(0, 14) = TextBox14.Value
ActiveCell.Offset(0, 15) = TextBox15.Value
ActiveCell.Offset(0, 16) = TextBox16.Value
ActiveCell.Offset(0, 17) = TextBox17.Value
ActiveCell.Offset(0, 18) = TextBox18.Value
ActiveCell.Offset(0, 19) = TextBox19.Value

ActiveCell.Offset(0, 20) = TextBox20.Value
ActiveCell.Offset(0, 21) = TextBox21.Value
ActiveCell.Offset(0, 22) = TextBox22.Value
ActiveCell.Offset(0, 23) = TextBox23.Value
ActiveCell.Offset(0, 24) = TextBox24.Value
ActiveCell.Offset(0, 25) = TextBox25.Value
ActiveCell.Offset(0, 26) = TextBox26.Value
ActiveCell.Offset(0, 27) = TextBox27.Value
ActiveCell.Offset(0, 28) = TextBox28.Value
ActiveCell.Offset(0, 29) = TextBox29.Value

ActiveCell.Offset(0, 30) = TextBox30.Value
ActiveCell.Offset(0, 31) = TextBox31.Value
ActiveCell.Offset(0, 32) = TextBox32.Value
ActiveCell.Offset(0, 33) = TextBox33.Value
ActiveCell.Offset(0, 34) = TextBox34.Value
ActiveCell.Offset(0, 35) = TextBox35.Value
ActiveCell.Offset(0, 36) = TextBox36.Value
ActiveCell.Offset(0, 37) = TextBox37.Value
ActiveCell.Offset(0, 38) = TextBox38.Value
ActiveCell.Offset(0, 39) = TextBox39.Value

ActiveCell.Offset(0, 40) = TextBox40.Value
ActiveCell.Offset(0, 41) = TextBox41.Value
ActiveCell.Offset(0, 42) = TextBox42.Value
ActiveCell.Offset(0, 43) = TextBox43.Value
ActiveCell.Offset(0, 44) = TextBox44.Value
ActiveCell.Offset(0, 45) = TextBox45.Value
ActiveCell.Offset(0, 46) = TextBox46.Value
ActiveCell.Offset(0, 47) = TextBox47.Value
ActiveCell.Offset(0, 48) = TextBox48.Value
ActiveCell.Offset(0, 49) = TextBox49.Value

ActiveCell.Offset(0, 50) = TextBox50.Value
ActiveCell.Offset(0, 51) = TextBox51.Value
ActiveCell.Offset(0, 52) = TextBox52.Value
ActiveCell.Offset(0, 53) = TextBox53.Value
ActiveCell.Offset(0, 54) = TextBox54.Value
ActiveCell.Offset(0, 55) = TextBox55.Value
ActiveCell.Offset(0, 56) = TextBox56.Value
ActiveCell.Offset(0, 57) = TextBox57.Value
ActiveCell.Offset(0, 58) = TextBox58.Value
ActiveCell.Offset(0, 59) = TextBox59.Value

ActiveCell.Offset(0, 60) = TextBox60.Value
ActiveCell.Offset(0, 61) = TextBox61.Value

MsgBox "Datos actualizados correctamente", vbInformation, "Almacen"
TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
TextBox4 = ""
TextBox5 = ""
TextBox6 = ""
TextBox7 = ""
TextBox8 = ""
TextBox9 = ""

TextBox10 = ""
TextBox11 = ""
TextBox12 = ""
TextBox13 = ""
TextBox14 = ""
TextBox15 = ""
TextBox16 = ""
TextBox17 = ""
TextBox18 = ""
TextBox19 = ""

TextBox20 = ""
TextBox21 = ""
TextBox22 = ""
TextBox23 = ""
TextBox24 = ""
TextBox25 = ""
TextBox26 = ""
TextBox27 = ""
TextBox28 = ""
TextBox29 = ""

TextBox30 = ""
TextBox31 = ""
TextBox32 = ""
TextBox33 = ""
TextBox34 = ""
TextBox35 = ""
TextBox36 = ""
TextBox37 = ""
TextBox38 = ""
TextBox39 = ""

TextBox40 = ""
TextBox41 = ""
TextBox42 = ""
TextBox43 = ""
TextBox44 = ""
TextBox45 = ""
TextBox46 = ""
TextBox47 = ""
TextBox48 = ""
TextBox49 = ""

TextBox50 = ""
TextBox51 = ""
TextBox52 = ""
TextBox53 = ""
TextBox54 = ""
TextBox55 = ""
TextBox56 = ""
TextBox57 = ""
TextBox58 = ""
TextBox59 = ""

TextBox60 = ""
TextBox61 = ""
TextBox62 = ""

TextBox2.Locked = True
TextBox3.Locked = True
TextBox4.Locked = True
TextBox5.Locked = True
TextBox6.Locked = True
TextBox7.Locked = True
TextBox8.Locked = True
TextBox9.Locked = True
TextBox10.Locked = True

TextBox11.Locked = True
TextBox12.Locked = True
TextBox13.Locked = True
TextBox14.Locked = True
TextBox15.Locked = True
TextBox16.Locked = True
TextBox17.Locked = True
TextBox18.Locked = True
TextBox19.Locked = True
TextBox20.Locked = True

TextBox21.Locked = True
TextBox22.Locked = True
TextBox23.Locked = True
TextBox24.Locked = True
TextBox25.Locked = True
TextBox26.Locked = True
TextBox27.Locked = True
TextBox28.Locked = True
TextBox29.Locked = True
TextBox30.Locked = True

TextBox31.Locked = True
TextBox32.Locked = True
TextBox33.Locked = True
TextBox34.Locked = True
TextBox35.Locked = True
TextBox36.Locked = True
TextBox37.Locked = True
TextBox38.Locked = True
TextBox39.Locked = True
TextBox40.Locked = True

TextBox41.Locked = True
TextBox42.Locked = True
TextBox43.Locked = True
TextBox44.Locked = True
TextBox45.Locked = True
TextBox46.Locked = True
TextBox47.Locked = True
TextBox48.Locked = True
TextBox49.Locked = True
TextBox50.Locked = True

TextBox51.Locked = True
TextBox52.Locked = True
TextBox53.Locked = True
TextBox54.Locked = True
TextBox55.Locked = True
TextBox56.Locked = True
TextBox57.Locked = True
TextBox58.Locked = True
TextBox59.Locked = True
TextBox60.Locked = True
TextBox61.Locked = True
TextBox62.Locked = True
Else
ActiveCell = TextBox1.Value
ActiveCell.Offset(0, 0) = TextBox1.Value
ActiveCell.Offset(0, 1) = TextBox2.Value
ActiveCell.Offset(0, 2) = TextBox3.Value
ActiveCell.Offset(0, 3) = TextBox4.Value
ActiveCell.Offset(0, 4) = TextBox5.Value
ActiveCell.Offset(0, 5) = TextBox62.Value
ActiveCell.Offset(0, 6) = TextBox6.Value
ActiveCell.Offset(0, 7) = TextBox7.Value
ActiveCell.Offset(0, Cool = TextBox8.Value
ActiveCell.Offset(0, 9) = TextBox9.Value

ActiveCell.Offset(0, 10) = TextBox10.Value
ActiveCell.Offset(0, 11) = TextBox11.Value
ActiveCell.Offset(0, 12) = TextBox12.Value
ActiveCell.Offset(0, 13) = TextBox13.Value
ActiveCell.Offset(0, 14) = TextBox14.Value
ActiveCell.Offset(0, 15) = TextBox15.Value
ActiveCell.Offset(0, 16) = TextBox16.Value
ActiveCell.Offset(0, 17) = TextBox17.Value
ActiveCell.Offset(0, 18) = TextBox18.Value
ActiveCell.Offset(0, 19) = TextBox19.Value

ActiveCell.Offset(0, 20) = TextBox20.Value
ActiveCell.Offset(0, 21) = TextBox21.Value
ActiveCell.Offset(0, 22) = TextBox22.Value
ActiveCell.Offset(0, 23) = TextBox23.Value
ActiveCell.Offset(0, 24) = TextBox24.Value
ActiveCell.Offset(0, 25) = TextBox25.Value
ActiveCell.Offset(0, 26) = TextBox26.Value
ActiveCell.Offset(0, 27) = TextBox27.Value
ActiveCell.Offset(0, 28) = TextBox28.Value
ActiveCell.Offset(0, 29) = TextBox29.Value

ActiveCell.Offset(0, 30) = TextBox30.Value
ActiveCell.Offset(0, 31) = TextBox31.Value
ActiveCell.Offset(0, 32) = TextBox32.Value
ActiveCell.Offset(0, 33) = TextBox33.Value
ActiveCell.Offset(0, 34) = TextBox34.Value
ActiveCell.Offset(0, 35) = TextBox35.Value
ActiveCell.Offset(0, 36) = TextBox36.Value
ActiveCell.Offset(0, 37) = TextBox37.Value
ActiveCell.Offset(0, 38) = TextBox38.Value
ActiveCell.Offset(0, 39) = TextBox39.Value

ActiveCell.Offset(0, 40) = TextBox40.Value
ActiveCell.Offset(0, 41) = TextBox41.Value
ActiveCell.Offset(0, 42) = TextBox42.Value
ActiveCell.Offset(0, 43) = TextBox43.Value
ActiveCell.Offset(0, 44) = TextBox44.Value
ActiveCell.Offset(0, 45) = TextBox45.Value
ActiveCell.Offset(0, 46) = TextBox46.Value
ActiveCell.Offset(0, 47) = TextBox47.Value
ActiveCell.Offset(0, 48) = TextBox48.Value
ActiveCell.Offset(0, 49) = TextBox49.Value

ActiveCell.Offset(0, 50) = TextBox50.Value
ActiveCell.Offset(0, 51) = TextBox51.Value
ActiveCell.Offset(0, 52) = TextBox52.Value
ActiveCell.Offset(0, 53) = TextBox53.Value
ActiveCell.Offset(0, 54) = TextBox54.Value
ActiveCell.Offset(0, 55) = TextBox55.Value
ActiveCell.Offset(0, 56) = TextBox56.Value
ActiveCell.Offset(0, 57) = TextBox57.Value
ActiveCell.Offset(0, 58) = TextBox58.Value
ActiveCell.Offset(0, 59) = TextBox59.Value
ActiveCell.Offset(0, 60) = TextBox60.Value
ActiveCell.Offset(0, 61) = TextBox61.Value
MsgBox "Datos actualizados correctamente", vbInformation, "Almacen"
TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
TextBox4 = ""
TextBox5 = ""
TextBox6 = ""
TextBox7 = ""
TextBox8 = ""
TextBox9 = ""

TextBox10 = ""
TextBox11 = ""
TextBox12 = ""
TextBox13 = ""
TextBox14 = ""
TextBox15 = ""
TextBox16 = ""
TextBox17 = ""
TextBox18 = ""
TextBox19 = ""

TextBox20 = ""
TextBox21 = ""
TextBox22 = ""
TextBox23 = ""
TextBox24 = ""
TextBox25 = ""
TextBox26 = ""
TextBox27 = ""
TextBox28 = ""
TextBox29 = ""

TextBox30 = ""
TextBox31 = ""
TextBox32 = ""
TextBox33 = ""
TextBox34 = ""
TextBox35 = ""
TextBox36 = ""
TextBox37 = ""
TextBox38 = ""
TextBox39 = ""

TextBox40 = ""
TextBox41 = ""
TextBox42 = ""
TextBox43 = ""
TextBox44 = ""
TextBox45 = ""
TextBox46 = ""
TextBox47 = ""
TextBox48 = ""
TextBox49 = ""

TextBox50 = ""
TextBox51 = ""
TextBox52 = ""
TextBox53 = ""
TextBox54 = ""
TextBox55 = ""
TextBox56 = ""
TextBox57 = ""
TextBox58 = ""
TextBox59 = ""

TextBox60 = ""
TextBox61 = ""
TextBox62 = ""

TextBox2.Locked = True
TextBox3.Locked = True
TextBox4.Locked = True
TextBox5.Locked = True
TextBox6.Locked = True
TextBox7.Locked = True
TextBox8.Locked = True
TextBox9.Locked = True
TextBox10.Locked = True

TextBox11.Locked = True
TextBox12.Locked = True
TextBox13.Locked = True
TextBox14.Locked = True
TextBox15.Locked = True
TextBox16.Locked = True
TextBox17.Locked = True
TextBox18.Locked = True
TextBox19.Locked = True
TextBox20.Locked = True

TextBox21.Locked = True
TextBox22.Locked = True
TextBox23.Locked = True
TextBox24.Locked = True
TextBox25.Locked = True
TextBox26.Locked = True
TextBox27.Locked = True
TextBox28.Locked = True
TextBox29.Locked = True
TextBox30.Locked = True

TextBox31.Locked = True
TextBox32.Locked = True
TextBox33.Locked = True
TextBox34.Locked = True
TextBox35.Locked = True
TextBox36.Locked = True
TextBox37.Locked = True
TextBox38.Locked = True
TextBox39.Locked = True
TextBox40.Locked = True

TextBox41.Locked = True
TextBox42.Locked = True
TextBox43.Locked = True
TextBox44.Locked = True
TextBox45.Locked = True
TextBox46.Locked = True
TextBox47.Locked = True
TextBox48.Locked = True
TextBox49.Locked = True
TextBox50.Locked = True

TextBox51.Locked = True
TextBox52.Locked = True
TextBox53.Locked = True
TextBox54.Locked = True
TextBox55.Locked = True
TextBox56.Locked = True
TextBox57.Locked = True
TextBox58.Locked = True
TextBox59.Locked = True
TextBox60.Locked = True
TextBox61.Locked = True
TextBox62.Locked = True




End If
CheckBox1.Value = False
CheckBox2.Value = False
End If
End Sub
Private Sub CommandButton2_Click()
Unload Me
main.Show
End Sub

Private Sub UserForm_initialize()
CheckBox1.Value = True
End Sub

2 Re: Error en formulario el 19/12/14, 09:36 pm

Igtelo


Hola Csanpin.

Permíteme "Felicitarte", esto es tener ganas de hacer las cosas y aprender!!!

De una vez te digo que en cuanto ya quede lo voy a subir a aportes de los usuarios, servirá para muchos que quieran aprender como hacer un formulario.

Primero lo vamos a hacer funcionar tal como lo tienes y ya que haya quedado, te paso unas alternativas para hacer los códigos más cortos.
Esto a mi me agrada mucho, ver que le buscan y con lo que van aprendiendo lo van desarrollando.

Ahora, sólo sube tu archivo y le vamos dando. Se paciente porque el fin de semana estaré de fiestas.

Te dejo estos enlaces que serán de tu interés:

http://www.universoexcelforo.com/t1166-como-utilizar-la-ayuda-de-vba-tutorial
Analiza con calma el Find y creo que ya lo podrás resolver.

http://www.universoexcelforo.com/t195-recomendaciones-para-trabajar-con-macros-aporte

3 Re: Error en formulario el 21/12/14, 02:41 pm

csanpin


Muchas Gracias por la info adjunto mi archivo...
Saludos

https://drive.google.com/folderview?id=0B1jG33UmdHxUY2gteXB2TDdUZ2s&usp=sharing

no lo puedo adjuntar ya que sobre pasa el limite permitido

4 Re: Error en formulario el 22/12/14, 11:17 pm

Igtelo


Hola csanpin.

En tu formulario de búsqueda (combobox2) trabaja bien, te extrae los datos correctamente.

Hice varias pruebas iniciando por el 1er registro luego otros, regreso al primero y sin problema, cambié datos manualmente en tu base de datos y cuando hace la búsqueda los muestra en su textbox correcto; lo cerré y volví a abrir y todo ok.

Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje [Página 1 de 1.]

Permisos de este foro:
No puedes responder a temas en este foro.