Question Status

Verified
Edward McGovern asked a question on 2 May 2013 11:42 AM

How do I loop through the controls on a form using VBA

something like:

dim ctl as Control

for each ctl in Me.Cotrols

Next

problem is there is no Control Collection accessible in SL VBA that I see.

Thanks

Reply
Verified Answer
Barry Flynn responded on 2 May 2013 9:03 PM

Have you looked at the mFindControlName API call?

Barry

Reply
Verified Answer
Barry Flynn responded on 2 May 2013 9:03 PM

Have you looked at the mFindControlName API call?

Barry

Reply
Edward McGovern responded on 3 May 2013 7:10 AM

Barry,  

      Thanks!  mFindControlName(1) returns name of first control and mFindControlName(0) returns the "next" control. All I need to loop.

Reply