Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SIMPLE UserForm w/ 2 OPTION BUTTONS
I am a somewhat newbie to VBA. How would you add constants for strin values? 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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
SIMPLE UserForm w/ 2 OPTION BUTTONS
For your code I would do something like
Public Const sOption1 As String = "EVAL" Public Const sOption2 As String = "BID" 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 = sOption1 Then Range("A1").Select ElseIf ton = sOption2 Then Range("C1").Select Else Msgbox "Error in selection" End If End Sub 'BELOW IS CODE FOR EACH OF 2 OPTION BUTTONS Private Sub optEVAL_Prices_Click() Button = sOption1 Unload Me End Sub Private Sub optBID_Prices_Click() Button = sOptions2 Unload Me End Sub -- HTH RP "Chuckles123" wrote in message ... I am a somewhat newbie to VBA. How would you add constants for string values? Chuckles123 -- Chuckles123 ------------------------------------------------------------------------ Chuckles123's Profile: http://www.excelforum.com/member.php...o&userid=14948 View this thread: http://www.excelforum.com/showthread...hreadid=268057 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
SIMPLE UserForm w/ 2 OPTION BUTTONS
Const sSTRING as String = "ABCD"
-- Regards, Tom Ogilvy "Chuckles123" wrote in message ... I am a somewhat newbie to VBA. How would you add constants for string values? Chuckles123 -- Chuckles123 ------------------------------------------------------------------------ Chuckles123's Profile: http://www.excelforum.com/member.php...o&userid=14948 View this thread: http://www.excelforum.com/showthread...hreadid=268057 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Option Buttons/Radio Buttons | New Users to Excel | |||
option buttons | New Users to Excel | |||
option buttons help | Excel Worksheet Functions | |||
SIMPLE UserForm w/ 2 OPTION BUTTONS | Excel Programming | |||
Option Buttons | Excel Programming |