Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default save and restore "Workbook Menu Bar" & "Cell" menus

I have a workbook where I have overridden several of the CommandBarButtons on
the standard "Workbook Menu Bar" and "Cell" CommandBars.

I have taken the drastic measure of resetting "Workbook Menu Bar" and "Cell"
CommandBars prior to making my changes and then resetting again in the
Workbook_Deactivate sub. I've taken this measure to prevent errors if for
some reason the particular CommandBarButtons that I'm changing are Nothing or
Not Enabled etc. This of coarse wipes out any customizations my users might
have made to their Menus, probably making them not happy.

I would like to somehow save the state of the "Workbook Menu Bar" and "Cell"
CommandBars on entry to my workbook and then restore it on
Workbook_Deactivate but I cannot figure out how.

Can someone tell me how to accomplish this?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default save and restore "Workbook Menu Bar" & "Cell" menus

http://groups.google.co.uk/advanced_group_search?hl=en

If you destroy customizations made by another application, there will be no
way to restore them if they used customized icons - well, it would be very
involved. Why not leave things along and test what you want to change to see
if it will cause problems. And when Excel crashes before your code
restores things? I would look at disabling and adding to rather than
removing or destroying. That is how excel operates.

--
Regards,
Tom Ogilvy


"Jeff Higgins" wrote in message
...
I have a workbook where I have overridden several of the CommandBarButtons

on
the standard "Workbook Menu Bar" and "Cell" CommandBars.

I have taken the drastic measure of resetting "Workbook Menu Bar" and

"Cell"
CommandBars prior to making my changes and then resetting again in the
Workbook_Deactivate sub. I've taken this measure to prevent errors if for
some reason the particular CommandBarButtons that I'm changing are Nothing

or
Not Enabled etc. This of coarse wipes out any customizations my users

might
have made to their Menus, probably making them not happy.

I would like to somehow save the state of the "Workbook Menu Bar" and

"Cell"
CommandBars on entry to my workbook and then restore it on
Workbook_Deactivate but I cannot figure out how.

Can someone tell me how to accomplish this?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default save and restore "Workbook Menu Bar" & "Cell" menus

Tom,
Thanks again for excellent advice. Of course you are right in advising me to
rethink the way I'm doing this. I'm busy now writing a bunch of If Then tests
and will use the disable/add paradigm rather than slash & burn.

Thanks also for the link, a search on: save restore excel menus, produced a
plethora of links that reinforced exactly your advice.

Appreciate the help,
Jeff Higgins


"Tom Ogilvy" wrote:

http://groups.google.co.uk/advanced_group_search?hl=en

If you destroy customizations made by another application, there will be no
way to restore them if they used customized icons - well, it would be very
involved. Why not leave things along and test what you want to change to see
if it will cause problems. And when Excel crashes before your code
restores things? I would look at disabling and adding to rather than
removing or destroying. That is how excel operates.

--
Regards,
Tom Ogilvy


"Jeff Higgins" wrote in message
...
I have a workbook where I have overridden several of the CommandBarButtons

on
the standard "Workbook Menu Bar" and "Cell" CommandBars.

I have taken the drastic measure of resetting "Workbook Menu Bar" and

"Cell"
CommandBars prior to making my changes and then resetting again in the
Workbook_Deactivate sub. I've taken this measure to prevent errors if for
some reason the particular CommandBarButtons that I'm changing are Nothing

or
Not Enabled etc. This of coarse wipes out any customizations my users

might
have made to their Menus, probably making them not happy.

I would like to somehow save the state of the "Workbook Menu Bar" and

"Cell"
CommandBars on entry to my workbook and then restore it on
Workbook_Deactivate but I cannot figure out how.

Can someone tell me how to accomplish this?





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
Protect "Copy" and "Save As" changes to workbook Jason W Excel Discussion (Misc queries) 3 January 4th 09 01:13 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
"CELL("FILENAME") NOT UPDATE AFTER "SAVE AS" ACTION yossie6 Excel Discussion (Misc queries) 1 June 16th 08 12:16 PM
Lost "File Menu" - now it's "Edit / View / Insert.." but no "F daves Excel Discussion (Misc queries) 3 April 24th 07 04:52 AM
if "a" selected from dropdown menu then show "K" in other cell LEGALMATTERS Excel Worksheet Functions 1 April 13th 06 06:05 PM


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