Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert Option Button based on value
I'm Looking to insert (2) option buttons into a area of my workshee when the value in another cell equals a certain value. I haven't bee able to find out how to do it yet, but I'm sure there's gotta be somewhat easy way for this. Can someone please help -- pjw2 ----------------------------------------------------------------------- pjw23's Profile: http://www.excelforum.com/member.php...nfo&userid=631 View this thread: http://www.excelforum.com/showthread.php?threadid=27233 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert Option Button based on value
Here's an example. You would put something like this into the code for the
sheet you want this to apply to. There's no error checking or anything. Change "A1" to the cell you want and the value 1 to whatever you want. Let me know if you need any help tweaking this to your needs. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address(False, False) = "A1" Then If Target.Value = 1 Then ActiveSheet.OLEObjects.Add ClassType:="Forms.OptionButton.1", _ Link:=False, DisplayAsIcon:=False, Left:=40, Top:=40, _ Width:=80, Height:=35 ActiveSheet.OLEObjects.Add ClassType:="Forms.OptionButton.1", _ Link:=False, DisplayAsIcon:=False, Left:=130, Top:=40, _ Width:=80, Height:=35 End If End If End Sub "pjw23" wrote in message ... I'm Looking to insert (2) option buttons into a area of my worksheet when the value in another cell equals a certain value. I haven't been able to find out how to do it yet, but I'm sure there's gotta be a somewhat easy way for this. Can someone please help? -- pjw23 ------------------------------------------------------------------------ pjw23's Profile: http://www.excelforum.com/member.php...fo&userid=6313 View this thread: http://www.excelforum.com/showthread...hreadid=272333 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert Option Button based on value
Is there any other methods to do, other than vba? norik -- norik ----------------------------------------------------------------------- norika's Profile: http://www.excelforum.com/member.php...nfo&userid=487 View this thread: http://www.excelforum.com/showthread.php?threadid=27233 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert Option Button based on value
I don't think there would be any other way. There's a conditional =IF()
function, but I don't see any function for embedding a control. So I think you would be stuck with VBA. "norika" wrote in message ... Is there any other methods to do, other than vba? norika -- norika ------------------------------------------------------------------------ norika's Profile: http://www.excelforum.com/member.php...fo&userid=4878 View this thread: http://www.excelforum.com/showthread...hreadid=272333 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Insert comments on Option Button of Forms Toolbar | Excel Discussion (Misc queries) | |||
keep source formatting is not an option in paste option button | Excel Discussion (Misc queries) | |||
Control Cell Link for Option Button based on value in a cell | Excel Programming | |||
Control Cell Link for Option Button based on value in a cell | Excel Programming | |||
Combobox populating based on Option Button | Excel Programming |