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: 1
Default SIMPLE UserForm w/ 2 OPTION BUTTONS


Below is the code for a 'main macro' and code for each of two Optio
Buttons.
You may find this useful in situations when you want to direct contro
to either of two sections of code based upon user selection o
alternatives presented.

Public Button As String
Sub CREATE_FORM()
'
frmPricing.Show
'SHOW Pricing UserForm ON DISPLAY

'USER SELECTS BUTTON

'AFTER SELECTION, CONTROL COMES BACK HERE
If Button = "EVAL" Then
Range("A1").Select

Else
Range("C1").Select
End If

End Sub

‘BELOW IS CODE FOR EACH OF 2 OPTION BUTTONS

Private Sub optEVAL_Prices_Click()
Button = "EVAL"
Unload Me
End Sub

Private Sub optBID_Prices_Click()
Button = "BID"
Unload Me
End Sub

The only missing steps are the assignment of a programmatic name and a
UserForm name to each of the Option Buttons, a Frame around the Button
(if so desired), and the UserForm itself.

You may find this useful in lieu of a MsgBox.

Chuckles12

--
Chuckles12
-----------------------------------------------------------------------
Chuckles123's Profile: http://www.excelforum.com/member.php...fo&userid=1494
View this thread: http://www.excelforum.com/showthread.php?threadid=26805

 
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
Option Buttons/Radio Buttons John Calder New Users to Excel 7 May 16th 08 03:51 AM
option buttons help kb Excel Worksheet Functions 2 June 18th 07 11:06 PM
Option Buttons coryrey Excel Discussion (Misc queries) 1 January 6th 06 03:49 PM
Option Buttons Robin Clay[_3_] Excel Programming 3 August 10th 04 06:30 PM
Option Buttons Alan Excel Programming 1 January 8th 04 05:55 PM


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

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"