Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
change the appearnce of a userform
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Norman Jones, post: 6320594"] Hi Tungana, Create a Userform with a Label, a ComboBox 3 CommandButtons and 3 OptionButtons. Add 10 TextBoxes where: TextBoxes 1 - 4 are the TextBoxes from the Page3 option; TextBox5 and TextBox6 are the additional 2 TextBoxes from the Page2 option; TextBox7 - TextBox10 are the remaining 4 TextBoxes. In the Userform's code module, paste the following code: '===========>> Option Explicit '------------->> Private Sub OptionButton1_Click() Dim i As Long For i = 1 To 10 Me.Controls("Textbox" & i).Visible = True Next i End Sub '------------->> Private Sub OptionButton2_Click() Dim i As Long For i = 1 To 10 Me.Controls("Textbox" & i).Visible = i < 7 Next i End Sub '------------->> Private Sub OptionButton3_Click() Dim i As Long For i = 1 To 10 Me.Controls("Textbox" & i).Visible = i < 5 Next i End Sub '------------->> Private Sub UserForm_Initialize() Dim i As Long For i = 1 To 10 Me.Controls("Textbox" & i).Visible = False Next i End Sub '<<=========== [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
change the appearnce of a userform
Top