Multipage form: Referencing controls on one page
some sample code:
Private Sub CommandButton3_Click()
For Each ctl In Me.MultiPage1.Pages(0).Controls
Debug.Print ctl.Name
Next
End Sub
just remember that the first page is index zero.
--
regards,
Tom Ogilvy
"Post Tenebras Lux" wrote:
I want to set the tabindex of the controls on only one page of a multipage
form.
I'm starting with
dim frm as msforms.userform
dim CTL as msforms.control
dim i as integer
set frm = Myform
i = 0
for each CTL in frm.controls
'I really would like to have said:
for each CTL in frm.controls on Multipage(1) '.i.e. Page 1 of the
Multipage form.
CTL.tabindex = i
i = i + 1
next
I tried VBA help, but can't seem to find the right way of referencing the
controls of a particular multipage page. I'm sure it's just a question of
syntax.
Greatly appreciated in advance
|