Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default VB Macro Buttons

Hello,

I have successfully created macros on the Menu Bar,
however the buttons stay resident for all excel files. I
know it is possible to create the macro buttons to only be
loaded when the appropriate file is opened. The buttons
should disappear when the file is closed.

Does anyone know how to do this? If so, please share.
Thanks!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default VB Macro Buttons

Keda,

You're looking for the Temporary parameter, which prevents Excel being stuck
with it.

You can have the Auto_Close procedure destroy the toolbar too.

Const cCommandBar = "MyCommandBar"
Dim bar As CommandBar
For Each bar In Application.CommandBars
If bar.Name = cCommandBar Then bar.Delete
Next

I have an example for Commandbars he
http://www.vangelder.co.nz/excel/index.html

Rob

"Keda Wang" wrote in message
...
Hello,

I have successfully created macros on the Menu Bar,
however the buttons stay resident for all excel files. I
know it is possible to create the macro buttons to only be
loaded when the appropriate file is opened. The buttons
should disappear when the file is closed.

Does anyone know how to do this? If so, please share.
Thanks!




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
Macro Buttons WVR Excel Discussion (Misc queries) 4 June 10th 09 10:37 PM
Macro buttons opening saved macro Wasabijim Excel Discussion (Misc queries) 0 April 29th 09 08:39 PM
Macro Buttons Lois Excel Worksheet Functions 4 April 1st 09 03:33 PM
Macro Buttons Radar man Excel Discussion (Misc queries) 3 May 15th 08 12:11 PM
look for buttons in a macro jkt Excel Discussion (Misc queries) 1 June 16th 06 04:10 PM


All times are GMT +1. The time now is 05:59 AM.

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"