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: 2
Default Adding Controls With VBA Code


I am attempting to create multi-page userform for use with surveys. The
general idea is that each tab will house one of the questions and (more
importantly) its possible answers.

Below is my current attempt for the first question. RList is an array
containing a list of names by region and changes depending on values of the
active row when the userform is activated. If there is a way to make the "1"
in "OptionButton1" change with the value of X I think I would have it. (as
written, ObjectButton1 is moved to the end with a caption equal to the last
object in RList)

Private Sub MultiPage1_Change()
Select Case MultiPage1.Value
Case 0
For X = 0 To RList.Count - 1
OptionButton1.Left = 12
OptionButton1.Top = 30 + X * 18
OptionButton1.Caption = RList(X + 1)
Next X
Case 1
...
...
Case Else
Exit Sub
End Select
End Sub

Ideally, I'd like to start with a blank page then create, name, and place
new controls (later portions of the survey will include text boxes and check
boxes) by looping through various arrays like this. Currently I just have
the max possible number of controls and will hide the ones not needed.

Thanks
 
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
Adding Sheet Controls gti_jobert[_95_] Excel Programming 3 May 2nd 06 12:58 PM
Adding controls to a form at runtime Todd Huttenstine Excel Programming 0 March 23rd 06 03:29 PM
Adding Controls in a toolbar? joe Excel Programming 2 February 20th 06 09:09 PM
Adding controls to userform ExcelMonkey[_190_] Excel Programming 3 February 25th 05 11:30 AM
Help with adding controls Badtaste2k Excel Programming 0 August 29th 03 11:38 PM


All times are GMT +1. The time now is 05:28 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"