Visual Basic - AYUDA ... !!!! PROBLEMAS CON MI DATAGID ... !!! AYUDA ... !!!

Life is soft - evento anual de software empresarial
 
Vista:

AYUDA ... !!!! PROBLEMAS CON MI DATAGID ... !!! AYUDA ... !!!

Publicado por juan (2 intervenciones) el 21/10/2017 12:22:43
buen dia ...
les comento ... !!! tengo que recorrer fisicamente todo un datagrid mi problema esta que al recorrer las celdas visibles y moverse el scroll mi busqueda se vuelve loca y comienza a brincar mi contador, y el datagrid se sigue recorriendo hasta el final brincando o saltandoce celdas ... !!!

para ser mas concreto el problema se da cuando datagrid1.row no acepta el valor de i

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
26
27
28
29
30
31
32
33
34
35
36
Private Sub Command5_Click()
Dim i As Integer
With DataGrid1
For i = 0 To .ApproxCount - 1
DataGrid1.Row = i
If DataGrid1.Row = i Then
'deselecciona las filas anteriores
With DataGrid1.SelBookmarks
While .Count > 0
.Remove 0
Wend
End With
 
On Error Resume Next
'selecciona la linea actual de busqueda
DataGrid1.SelBookmarks.Add DataGrid1.Bookmark
 
 
DataGrid1.Col = 1
buscar = DataGrid1
If Len(buscar) = 7 Then
balance (buscar)
If balance > 0 Then
txt1.Text = buscar
 
End If
End If
 
Else
End If
 
Next
 
End With
 
End Sub
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder