LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default How to set Optionbox value from code?

I have an Excel applciaiton, it reads values from an Access database and
fills in multiple worksheets with the databse information.
One of these worksheets contains a group box with two option boxes labelled
YES and NO respectively.
I need to set these option box values from the database. The option box
controls are NOT bound to any worksheet cells.

I have tried the following:
assess.Shapes("optCommitYES").ControlFormat.Value = msoTrue
(assess is a worksheet object name)
and VBA blows up with an Error 1004: "Unable to set the Value property of
the OptionButton class."

If this were Access, I'd set/retrieve the value through the group box
control, but this is Excel, and things don't work that way here...so hwo do i
set the control(s) value(s) to selected/unselected via code from the db value?
Will I be forced to select one or more cells to bind these option button
controls to (trying to avoid that as it will mean changing already approved
template files yet again), or what?
 
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
Code for OptionBox Noepie Excel Programming 2 December 12th 08 10:30 AM
Excel Equivalent of Access OptionBox LarryP Excel Programming 2 October 30th 07 08:59 PM
Excel Checkboxs, Optionbox Brandon Excel Discussion (Misc queries) 1 January 19th 07 08:25 PM
optionbox checkbox flow23 Excel Discussion (Misc queries) 3 November 24th 05 01:00 PM
OptionBox error checking Patrick Simonds Excel Programming 1 September 29th 05 08:39 AM


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