Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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
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
refering to other workbooks cjbarron5 Excel Discussion (Misc queries) 2 June 2nd 08 08:17 PM
Refering a cell Arun Kumar Saha Excel Worksheet Functions 2 June 18th 07 12:48 PM
Refering to Cells madh83 Excel Worksheet Functions 3 July 19th 06 11:39 PM
Refering to an empty cell Nicoscot Excel Discussion (Misc queries) 1 March 10th 06 12:59 AM
Refering to a tab using data from a cell dan Excel Worksheet Functions 5 May 13th 05 01:24 PM


All times are GMT +1. The time now is 05:10 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"