View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
sbriscoe[_4_] sbriscoe[_4_] is offline
external usenet poster
 
Posts: 1
Default CommandBar code does NOT work if Excel is Already Open :(

Hi.
Here is the code that I am using:

theWorksheet.Activate();

ToolBar = ExcelApp.CommandBars["Standard"];
ToolBar.Controls["Save"].Visible = false;
ToolBar.Controls["Open"].Visible = false;
ToolBar.Controls["New"].Visible = false;

theWorksheet.Deactivate();


If Excel is already running on my machine - then the Save/New and Open
buttons are STILL visible.

If Excel is not already running - then the buttons are gone.

I am not sure how to solve this problem....


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