![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: John G
Posts: 62
|
I have a activex radio button that is named ship on a sheet that is named "invoice". I am trying to write a macro that will make a decision on what to do based on the state of that radio button. I don't know the correct synatx to call it. I have tried code like:
if sheets("invoice").ship = true then (which didn't work) or if ship = true then (which didn't work either) Can someone give me a hand here? Thanks, John |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
Try the following:
If Worksheets("invoice").OptionButton1.Value = True Then MsgBox "it worked" Change the name optionbutton1 to the name of your button, if you are sure it is named ship. Make sure that the name is ship and not just the caption.
__________________
Kind regards, Al Chara |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|