Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 421
Default change the appearnce of a userform

Hi Tungana,

Create a Userform with a Label, a ComboBox
3 CommandButtons and 3 OptionButtons.

Add 10 TextBoxes whe

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
'<<===========



---
Regards.
Norman


"TUNGANA KURMA RAJU" wrote in
message ...
Is it possible design a user form with cusomised controls ?
I built a userform with multipage control.
Page 1 Page2 Page3
1 label 1 label 1 label
1 combobox 1 combobox 1 combobox
3 commandbuttons 3 commandbuttons 3 commandbuttons
10 textboxes 6textboxes 4 textboxes
is it possible redesign this userform into a compact one page form?
By putting 3 optionbuttons at top of the userform,if optionbutton1 is
selected userform with 10 textboxes be displayed,if optionbutton2 is
selected
userform appearance be changed with 6 textboxes.


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
UserForm Tab Name Change Sue Excel Programming 0 February 21st 08 12:02 PM
Change properties of a userform Mike Archer Excel Programming 9 June 7th 06 01:36 AM
Change image in UserForm Joseph[_58_] Excel Programming 1 February 20th 06 02:54 AM
Change UserForm ControlSource with VBA [email protected] Excel Discussion (Misc queries) 2 February 24th 05 08:05 AM
UserForm Change Of Height Rockee052[_57_] Excel Programming 3 March 6th 04 07:47 AM


All times are GMT +1. The time now is 06:12 PM.

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"