Excel Menu Corruption

D

Dave White

I tried to create an excel macro for the 'Sheet Hide' command from the menu.
All I did was corrupted this command on the menu. Now it always tries to hide
the sheet in the file I had open when I tried to create the macro.

Is there something less drastic than un-installing/re-installing office?

TIA

Dave White
 
G

Gord Dibben

Dave

If you post your code we would have a better chance to help you.

Did you use the macro recorder when creating the macro?

Possibly you have the sheet name hard-coded in the code.

If you replace that hard-coded name with ActiveSheet perhaps would be better.


Gord Dibben Excel MVP
 
D

Dave White

Gord,

I did not 'create' a macro as such. What I attempted to do was copy the
existing Menu Command 'Hide Sheet' to a macro button. 'fileA.xls' was open to
'Sheet 1' at the time I created this macro button.

What I ended up getting was a modification to Menu command 'Hide Sheet' that
tries to first Open 'fileA.xls' and then hide 'Sheet 1'. I cannot get the
'Hide Sheet' command to work generically anymore. I do not have access to
this code (under lock of a MS password, I think).

Does this make sense. Sorry, using Excel 2k.
 
G

Gord Dibben

Dave

I assume you went in through Tools>Customize and Format>Sheet>Hide and made
the modification to that menu item.

Try Tools>Customize and drag the Format Menu off the Worksheet Menu Bar.

Then select Commands tab and "Built-in Menus". Select Format and drag it up
to the worksheet menu bar.

If you want a "hide sheet" macro on a button, I would suggest recording a
macro whilst using Excel's Format>Sheet>Hide.

Then assign that macro to a button.


Gord
 
D

Dave White

Gord,

Thanks for your patience. Yes You were exactly correct. It is back to normal.
 
Top