LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Parents and looping

I have a loop that worked just fine unitl I changed my userform and therefore
had to change the code. The problem with the loop is that I want it to go
through every control in two different frames. I do not know how to write
this. Thus the erronous line is:

For Each ctl In Me.StartDatumRam1.Controls & in Me.StartDatumRam2.Controls

The first part until the "&" is correct I just dont know how to write it for
two frames. please help me out! Thanks very much!

The complete loop
Private Sub startDatumTextBoxSub()
Dim i As Long
Dim ctl As Control
ReDim strStartDatumArray(0 To lngNumberOfCheckBoxes)
For Each ctl In Me.StartDatumRam1.Controls & in
Me.StartDatumRam2.Controls
If TypeName(ctl) = "TextBox" Then
strStartDatumArray(i) = ctl.Value
i = i + 1
End If
Next ctl
End Sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looping David T Excel Discussion (Misc queries) 2 August 30th 06 10:51 PM
Looping Buffyslay Excel Programming 1 February 1st 06 05:57 PM
Help with looping dok112[_55_] Excel Programming 0 November 1st 05 05:09 PM
Grab Parents? Kidaz Excel Programming 1 October 21st 05 07:04 PM
Looping Louise[_4_] Excel Programming 1 September 10th 04 04:57 PM


All times are GMT +1. The time now is 04:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"