PC Review


Reply
Thread Tools Rate Thread

control toolbox vs forms toolbars

 
 
Sasa Stankovic
Guest
Posts: n/a
 
      29th Dec 2008
Hi,
I have BIG issue!
On Sheet1 I have 2 OptionButton's (OptionButton1 and OptionButton2, as name
box shows me).
Problem is in the fact that they are from Control toolbox and they are not
linked to any cell or variable.
I need to check which one is selected!
I do now the procedure when working with Forms toolbar but how to work with
OptionButton from control toolbox which is placed on sheet?!?!
Any idea?

for example:
If [OptionButton1] = true then
' write something in cell AV6
Else
' write something else in cell AV6
EndIf

of course, this is not working...

please, anyone.....

 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      30th Dec 2008
If Worksheets("Sheet1").optionbutton1.Value = true then
worksheets("Sheet1").range("av6") = "hi"
else
worksheets("Sheet1").range("av6") = "bye"
end if



Sasa Stankovic wrote:
>
> Hi,
> I have BIG issue!
> On Sheet1 I have 2 OptionButton's (OptionButton1 and OptionButton2, as name
> box shows me).
> Problem is in the fact that they are from Control toolbox and they are not
> linked to any cell or variable.
> I need to check which one is selected!
> I do now the procedure when working with Forms toolbar but how to work with
> OptionButton from control toolbox which is placed on sheet?!?!
> Any idea?
>
> for example:
> If [OptionButton1] = true then
> ' write something in cell AV6
> Else
> ' write something else in cell AV6
> EndIf
>
> of course, this is not working...
>
> please, anyone.....


--

Dave Peterson
 
Reply With Quote
 
Sasa Stankovic
Guest
Posts: n/a
 
      30th Dec 2008
Your soution works perfectly....
I was near but not close enough...

THANK YOU one more time!

"Leith Ross" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> Hello Sasa Stankovic,
>
> The easiest and quickest solution would be remove the Control Toolbox
> Option Buttons and replace them with the Forms Option Buttons. If you
> can't replace the buttons, here is how to check...
>
> Code:
> --------------------
>
> Sub CheckOptionButtons()
>
> Dim OleObj As Object
> Dim OptBtn As Object
>
> With ActiveSheet
> For Each OleObj In .OLEObjects
> If TypeName(OleObj.Object) = "OptionButton" Then
> Set OptBtn = OleObj.Object
> If OptBtn = True Then
> MsgBox OleObj.Name & " is Set."
> End If
> End If
> Next OleObj
> End With
>
> End Sub
>
> --------------------
>
> Sincerely,
> Leith Ross
>
>
> --
> Leith Ross
> ------------------------------------------------------------------------
> Leith Ross's Profile:
> http://www.thecodecage.com/forumz/member.php?userid=75
> View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=44968
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Forms - using Forms Toolbar and Control toolbox in one document trainhappy Microsoft Word Document Management 1 12th Jun 2008 09:07 PM
Control Toolbox vs Forms Jon Crawford Microsoft Excel Programming 1 20th Feb 2008 09:46 PM
control toolbox and userform toolbars in XL 03 Dave F Microsoft Excel Misc 2 8th Aug 2007 08:04 AM
forms toolbar vs. control toolbox anny Microsoft Excel Programming 1 9th May 2006 02:31 AM
Control Toolbox vs Forms =?Utf-8?B?UGV0ZXI=?= Microsoft Excel Programming 3 5th Feb 2004 04:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:54 AM.