Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi All, I have this code working for selecting a userform: Private Sub CommandButton1_Click() If Button = OptionButton1 Then UserForm1.Show ElseIf Button = OptionButton2 Then UserForm2.Show End If End Sub Now I want to add a 3rd. button. I tried inserting another if statement but it does not show my new user form. Any help would be apreicated Thanks Syed -- saziz ------------------------------------------------------------------------ saziz's Profile: http://www.excelforum.com/member.php...fo&userid=6350 View this thread: http://www.excelforum.com/showthread...hreadid=492924 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can you post the code that is not working?
Alok "saziz" wrote: Hi All, I have this code working for selecting a userform: Private Sub CommandButton1_Click() If Button = OptionButton1 Then UserForm1.Show ElseIf Button = OptionButton2 Then UserForm2.Show End If End Sub Now I want to add a 3rd. button. I tried inserting another if statement but it does not show my new user form. Any help would be apreicated Thanks Syed -- saziz ------------------------------------------------------------------------ saziz's Profile: http://www.excelforum.com/member.php...fo&userid=6350 View this thread: http://www.excelforum.com/showthread...hreadid=492924 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi alok, Here is the code: Private Sub CommandButton1_Click() If Button = OptionButton1 Then UserForm1.Show End If If Button = OptionButton2 Then UserForm2.Show End If If Button = optionbutton4 Then UserForm4.Show End If End Sub What is happening is when I select a button, it shows all 3 userforms one by one. Syed -- saziz ------------------------------------------------------------------------ saziz's Profile: http://www.excelforum.com/member.php...fo&userid=6350 View this thread: http://www.excelforum.com/showthread...hreadid=492924 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Saziz
Try: '============= Private Sub CommandButton1_Click() If OptionButton1 Then UserForm1.Show ElseIf OptionButton2 Then UserForm2.Show ElseIf OptionButton4 Then UserForm4.Show End If End Sub '<<============= --- Regards, Norman "saziz" wrote in message ... Hi alok, Here is the code: Private Sub CommandButton1_Click() If Button = OptionButton1 Then UserForm1.Show End If If Button = OptionButton2 Then UserForm2.Show End If If Button = optionbutton4 Then UserForm4.Show End If End Sub What is happening is when I select a button, it shows all 3 userforms one by one. Syed -- saziz ------------------------------------------------------------------------ saziz's Profile: http://www.excelforum.com/member.php...fo&userid=6350 View this thread: http://www.excelforum.com/showthread...hreadid=492924 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Norman, Thanks, your code worked fine. Syed -- saziz ------------------------------------------------------------------------ saziz's Profile: http://www.excelforum.com/member.php...fo&userid=6350 View this thread: http://www.excelforum.com/showthread...hreadid=492924 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Display a selection while UserForm is in focus | Excel Programming | |||
Looping procedure calls userform; how to exit loop (via userform button)? | Excel Programming | |||
Print - Userform Multipage selection | Excel Programming | |||
selection all textboxes in userform at once | Excel Programming | |||
Date Selection Userform | Excel Programming |