Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
refering to option buttions
i want to refer to 1 of several option buttons.
the choice of which button is determined by the value stored as a named range (EmployeePosition)... in the following, if the value of Employee Range = "Assoc", i would want the value of the option button: obAssoc on UserForm1 to be true Dim obEmployeePostion As Object obEmployeePosition = "ob" & [EmployeePosition] Load UserForm1 UserForm1.obEmployeePosition.Value = True End Sub ...... doesn't seem to be the right approach... thanks in advance, mark |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
refering to option buttions
Where are you storing EmployeePosition, cell, textbox?
If cell then you can use: 'cells(1,1) refers to cell A1 If Cells(1,1) = "Assoc" Then Load UserForm1 UserForm1.obEmployeePosition.Value = True End If If you are using a TextBox then you can use: If Textbox1.value = "Assoc" Then Load UserForm1 UserForm1.obEmployeePosition.Value = True End If HTH "mark kubicki" wrote in message .. i want to refer to 1 of several option buttons. the choice of which button is determined by the value stored as a named range (EmployeePosition)... in the following, if the value of Employee Range = "Assoc", i would want the value of the option button: obAssoc on UserForm1 to be true Dim obEmployeePostion As Object obEmployeePosition = "ob" & [EmployeePosition] Load UserForm1 UserForm1.obEmployeePosition.Value = True End Sub ..... doesn't seem to be the right approach... thanks in advance, mark |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
refering to option buttions
neither,
it is being stored as a constant as a "name" (XL/insert/names/define... only i'm doing it through VBA: add.names... refers to... ) Mark Kubicki *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
refering to option buttions
as a "NAME" (XL/insert/names... but created/stored thru VBA, names.add...
refers to...) note: the option buttion is reffered to as ob+(the value stored in the "NAME": EmployeePosition ex: if EmployeePosition stored the value Assoc, the option button is obAssoc in the "NAME"(EmployeePositon) only the description of the actual position is stored; i need to add the prefix "ob" to correctly refer to the object option button ....my though is that this way i could concatenate the value of (Employee Position) with different prefixes to access different stuff all relating to that value (is this confusing?) "Cliff Myers" wrote in message ... Where are you storing EmployeePosition, cell, textbox? If cell then you can use: 'cells(1,1) refers to cell A1 If Cells(1,1) = "Assoc" Then Load UserForm1 UserForm1.obEmployeePosition.Value = True End If If you are using a TextBox then you can use: If Textbox1.value = "Assoc" Then Load UserForm1 UserForm1.obEmployeePosition.Value = True End If HTH "mark kubicki" wrote in message .. i want to refer to 1 of several option buttons. the choice of which button is determined by the value stored as a named range (EmployeePosition)... in the following, if the value of Employee Range = "Assoc", i would want the value of the option button: obAssoc on UserForm1 to be true Dim obEmployeePostion As Object obEmployeePosition = "ob" & [EmployeePosition] Load UserForm1 UserForm1.obEmployeePosition.Value = True End Sub ..... doesn't seem to be the right approach... thanks in advance, mark |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
refering to other workbooks | Excel Discussion (Misc queries) | |||
Refering a cell | Excel Worksheet Functions | |||
Refering to Cells | Excel Worksheet Functions | |||
Refering to an empty cell | Excel Discussion (Misc queries) | |||
Refering to a tab using data from a cell | Excel Worksheet Functions |