I have three flexgrids on my form and want to programmitically loop through them.
I tried
What am I doing wrong?Code:
Dim cntrl as MSHFlexGrid
For Each cntrl in Me.Controls
'process info
next cntrl
Printable View
I have three flexgrids on my form and want to programmitically loop through them.
I tried
What am I doing wrong?Code:
Dim cntrl as MSHFlexGrid
For Each cntrl in Me.Controls
'process info
next cntrl
Not sure but just put Next, instead of Next cntrl
What seems to be the problem?
I tried this code on mine and it walked through it fine.
code_baron
Try this
Code:Dim ctl As Control
'/
For Each ctl In Me.Controls
If TypeName(ctl) = "MSHFlexGrid" Then
'/ do your funky stuff
End If
Next
'/
Set ctl = Nothing
td.
oh, and isn't it MSFlexGrid, not MSHFlexGrid?
td.