LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default assigning value to option button

Sorry this is on a userform. I only want OptionBoutton1 to be true if the
value in the rng equals pto (If rng(1, 8).Value = "pto")




"Tom Ogilvy" wrote in message
...
for an optionbutton on the worksheet

? Activesheet.optionbutton1.value
False
Activesheet.optionbutton1.Value = True
? Activesheet.optionbutton1.value
True

on a userform

Private Sub UserForm_Initialize()
OptionButton1.Value = True
End Sub

both worked for me.

Perhaps the IF is not being satisfied.

--
regards,
Tom Ogilvy


"Patrick Simonds" wrote in message
...
Why is it that this will not set OptionButton1 to true? rng has been
defined and set rng = Cells(ActiveCell.Row, 1). pto is what is in the
referenced cell.

If rng(1, 8).Value = "pto" Then
OptionButton1.Value = True






 
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
Assigning a macro to a button hberg Excel Worksheet Functions 1 January 27th 10 10:31 PM
Assigning A Macro to A Button Holly Excel Worksheet Functions 1 January 18th 08 10:04 AM
keep source formatting is not an option in paste option button Tina Excel Discussion (Misc queries) 0 February 20th 06 09:58 PM
Assigning a macro to a button Junkyard Engineer Excel Programming 3 June 9th 05 02:00 PM
Assigning name to button Grant Reid Excel Programming 4 June 3rd 04 08:55 AM


All times are GMT +1. The time now is 09:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"