
Bucle no coloca datos en los textboxs
Publicado por ABED (3 intervenciones) el 24/02/2015 05:53:19
Buenas noches, señores del foro;
Estoy angustiado porque no hallo razón porque mi código no funciona y es
el siguiente:
En otro evento:
Aquí el problema es que no hallo porqué el código no llena los textboxs con la información que esta en la hoja1. Agradezco su tiempo para contestar mi pregunta, estoy realmente atormentado.
Estoy angustiado porque no hallo razón porque mi código no funciona y es
el siguiente:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Prívate sub combobox1_change()
Dim i as integer
Dim final as integer
For i = 2 to 100
If hoja1.cells(i,1)="" tren
Final=i-1
Exit for
End if
Next
For i=2 to final
If combobox1=hoja1.cells(i,1) then
Textbox1=hoja1.cells(i,1)
Textbox2=hoja1.cells(i,2)
.....sucesivamente
Exit for
End if
Next
End sub
En otro evento:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Prívate sub combobox1_enter()
Dim i as integer
Dim j as integer
Dim h as integer
Dim final as integer
Dim tarea as integer
Combobox1.backcolor=vbgreen
For i=2 to Combobox1.listcount
Combobox1.removeItem 0
Next i
For j =2 to 1000
If hoja1.cells(j,1)="" then
Final=j-1
Exit for
End if
Next
For h=2 to final
Tarea=hoja1.cells(h,1)
Combobox1.additem (tarea)
Next
End sub
Aquí el problema es que no hallo porqué el código no llena los textboxs con la información que esta en la hoja1. Agradezco su tiempo para contestar mi pregunta, estoy realmente atormentado.
Valora esta pregunta


0