Puse este código :
grdInf.col=0
grdInf.row=1
grdInf.setfocus
pero me pone un cartel de error: "Llamada a argumento o procedimiento no válido"
Dejo el código para ver si loe estoy colocando:
Código:
Código :
Private Sub Form_Load() With grdInf .Clear .Cols = 1 .ColAlignment(0) = 4 .ColWidth(0) = 4000 .TextMatrix(0, 0) = "Código del Interesado" End With cargar End sub Sub cargar() If Not Conectar Then Exit Sub sql server server = "Select * from Informes order by Codigo asc" Set Rs = Cn.Execute(sql server) lin = 0 Do While Not Rs.EOF With grdInf lin = lin + 1 .AddItem "" .TextMatrix(lin, 0) = Rs!Codigo Rs.MoveNext End With Loop grdInf.col=0 grdInf.row=1 grdInf.setfocus Exit Sub Do While Rs.EOF With grdInf lin = lin + 1 .AddItem "" .TextMatrix(lin, 0) = Rs!Codigo Rs.MoveNext