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: 5,939
Default checkbox for commandbar

Use a regular msoControlButton but use something like this for the on action...

Private Sub CheckButton()
Dim cbrMenu As CommandBar
Dim ctlCBarControl As CommandBarButton

Set cbrMenu = CommandBars("MyBar")
Set ctlCBarControl = cbrMenu.Controls("MyMenuName).Controls("MyControl" )

If ctlCBarControl.State = msoButtonDown Then
'some code
ctlCBarControl.State = msoButtonUp
Else
'somecode
ctlCBarControl.State = msoButtonDown
End If
Set cbrMenu = Nothing
Set ctlCBarControl = Nothing
End Sub

--
HTH...

Jim Thomlinson


"Redan" wrote:

Hello,

I would like to add control that would be like a checkbox in my commandbar
for excel 2002.

Is there any checkbox for msoControl or othere ways to do so ?

Thanks in advance for the help !!!

 
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
How to have Checkbox A uncheck with checked Checkbox B Texas Aggie Excel Discussion (Misc queries) 3 July 20th 07 10:58 PM
link a checkbox in a sheet to a checkbox on a userform? Arjan Excel Programming 0 November 10th 06 01:37 PM
How do I link one checkbox to update another checkbox? Mike Excel Programming 3 April 28th 06 02:22 AM
cant dim as commandbar Seren Excel Programming 1 December 21st 05 09:18 PM
checkbox on form reset from checkbox on sheet raw[_12_] Excel Programming 1 December 3rd 05 05:08 AM


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