Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Highlight a selected toolbar in a menu!

Hello!

I would like to highlight (possibly with a coloured 'tick mark')
selected toolbar rom a menu.
I.e. any toolbar selected by the user from a menu should be highlighte
so that the user can see which ones were selected in the end. I wrot
the following macro for the same but can't figure out what'z wrong.

==============================================

Sub Macro1()

With Application.CommandBars.ActionControl
If .State = msoButtonUp Then
ActiveWorkbook.Worksheets(.Caption).Visible = xlSheetHidden
.State = msoButtonDown
Else
ActiveWorkbook.Worksheets(.Caption).Visible = xlSheetVisible
.State = msoButtonUp
End If
End With

End Sub
==============================================

I would appreciate your help guys.

Thanks a bunch, best regds.

Arun

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Highlight a selected toolbar in a menu!

you do follow the approach in these articles:

http://support.microsoft.com/?id=161926
XL97: How to Place a Checkmark Next to a Menu Item

http://support.microsoft.com/?id=213735
XL2000: How to Place a Check Mark Next to a Custom Menu Item

so I guess the question is what is the problem. Saying you can't figure out
what is wrong doesn't tell us what results you are getting that don't match
your expectations.

--
Regards,
Tom Ogilvy

"aiyer " wrote in message
...
Hello!

I would like to highlight (possibly with a coloured 'tick mark') a
selected toolbar rom a menu.
I.e. any toolbar selected by the user from a menu should be highlighted
so that the user can see which ones were selected in the end. I wrote
the following macro for the same but can't figure out what'z wrong.

==============================================

Sub Macro1()

With Application.CommandBars.ActionControl
If .State = msoButtonUp Then
ActiveWorkbook.Worksheets(.Caption).Visible = xlSheetHidden
State = msoButtonDown
Else
ActiveWorkbook.Worksheets(.Caption).Visible = xlSheetVisible
State = msoButtonUp
End If
End With

End Sub
==============================================

I would appreciate your help guys.

Thanks a bunch, best regds.

Arun.


---
Message posted from http://www.ExcelForum.com/



Reply
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 do I have a cell highlight when selected? Rhonda Excel Worksheet Functions 1 October 2nd 06 06:06 PM
How do I have a cell highlight when selected? Rhonda Excel Discussion (Misc queries) 3 October 2nd 06 05:32 PM
How do I have a cell highlight when selected? Rhonda Excel Discussion (Misc queries) 0 October 2nd 06 05:12 PM
Highlight Row when selected cassy01 Excel Discussion (Misc queries) 2 September 6th 05 02:30 PM
How do I change the highlight color of selected menu items? PepperVL Excel Discussion (Misc queries) 1 March 12th 05 02:13 PM


All times are GMT +1. The time now is 07:46 AM.

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

About Us

"It's about Microsoft Excel"