Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Form Option Buttons and Combo Boxes in VBA
My spreadsheet is using items from the Form toolbar like
Option Buttons and Combo Boxes, but I don't understand how to address or control them in VBA. Another user helped me to clear all Option Buttons: Dim opt As OptionButton For Each opt In ActiveSheet.OptionButtons opt.Value = False Next opt This works fine but how do I address a specific Option Button, if I right click it there is no Properties option, or do I get it from the Name Box, if that is so I still can't see it because the Name box is too small? Please help with 2 examples: What is the command to set an Option Box to True What is the command to set a Combo Box to display some text. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Form Option Buttons and Combo Boxes in VBA
Activesheet.OptinButton s("Option Button 1").Value = xlOn
With ActiveSheet.DropDowns("Drop Down 1") MsgBox .List(3) End With or With ActiveSheet.DropDowns("Drop Down 1") MsgBox .List(.ListIndex) End With to get the selected value -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Newboy18" wrote in message ... My spreadsheet is using items from the Form toolbar like Option Buttons and Combo Boxes, but I don't understand how to address or control them in VBA. Another user helped me to clear all Option Buttons: Dim opt As OptionButton For Each opt In ActiveSheet.OptionButtons opt.Value = False Next opt This works fine but how do I address a specific Option Button, if I right click it there is no Properties option, or do I get it from the Name Box, if that is so I still can't see it because the Name box is too small? Please help with 2 examples: What is the command to set an Option Box to True What is the command to set a Combo Box to display some text. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hide Group Boxes Around Option Buttons | Excel Worksheet Functions | |||
Check Boxes or Option Buttons | Excel Discussion (Misc queries) | |||
option buttons or check boxes | New Users to Excel | |||
Check Boxes and Option Buttons | Excel Programming | |||
Forms: Group Boxes and Option Buttons | Excel Programming |