View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Programatically saving workbook (or worksheet) without the code

Hi N10,

Thank you very much for your help. Yes, I did the same as
what you suggested. However, added menu-bar group in
source book was gone after saving. I have no idea how it
happened.

Hugh

-----Original Message-----
Hi Hugh

With your SOurce spreadsheet running why dont you use the

macro recorder to
create a new workbook then copy the sheet from your

Source book to the new
book, then save the new book with any name you choose.

That would be a
start and avoids all the form and code issues you

describe. You can then
tidy up the code and maybe place in the workbook code as

a close event.

Hope this helps

"Hugh" wrote in message
...
Hi there,

I have a excel workbook with single sheet and want to
save. The problem is that there are a couple of forms in
workbook_open event. If I use workbook.Saveas method to
save the book, those forms will pop up when I open saved
files. What is the best way to save workbook without
saving the code? Or what is the best way to
programatically delete the code and save? I copied the
book to a new book and save the new book by using
Workbook.SaveAs FileName:= "Name", FileFormat:=
xlExcel4, "", "", "", I also able to save the book

without
the code. But the problem is that those forms poped up
twice during copy book and reactive original book since

I
need to bring original book back for upcoming process.
Thank you very much in advance for help.

Hugh



.