Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Multipage form: Referencing controls on one page

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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


Reply
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
Multipage: [Me.Controls("Page" & i).Name] does not work Zurn[_34_] Excel Programming 2 March 24th 06 08:07 AM
Adding controls to each page in a multipage form michael fuller Excel Programming 5 January 13th 06 09:46 PM
Multipage & Spinbutton controls on a form Bhuktar S Excel Programming 1 April 21st 04 01:50 PM
how to put a reference from a page of a multipage form to another page Valeria[_2_] Excel Programming 2 January 25th 04 08:21 AM
Can I set a page of a Multipage form to active? John T Ingato Excel Programming 2 October 11th 03 12:15 AM


All times are GMT +1. The time now is 04:27 AM.

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

About Us

"It's about Microsoft Excel"