Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove all Macros when Save As..

Status
Not open for further replies.

FAM

Technical User
Jan 13, 2003
345
GB
I have an Excel Spreadsheet (adc1632.xls) that controls a datalogger, which i have a couple of macros created that start, stop, recording etc. I have these macro's assigned to a toolbar.

The problem is, when the I finish recording and save the file under a different name and close Excel, then when i go back to the original file (adc1632.xls) and use the toolbar it opens the file which i saved, and tries to use it under that file.

Basically, i would like to keep the toolbar for just the one file (adc1632.xls), so as when you save it you lose the toolbar and any references to the original file but keeps all the data, is this possible?

Thanks in Advance

 
Use the workbook_open event to initialise your toolbar and Workbook_BeforeClose(Cancel As Boolean) to reset your toolbar.

Cheers

John
 
Thanks John for the response but as im not the most knowledge person of VBA could you explain where i implement the code, the toolbar is called "Pressuremeter Controls", do i write in the General Declerations,
Private workbook_open Pressuremeter Controls
Private workbook_BeforeClose(Cancel As Boolean)
???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top