View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Save As and new workbook new name used in existing code


Note that every copy you make using ThisWorkbook.SaveAs contains

macros,

which is not recommended as a 'good practice' in general!



<FWIW

Since you appear to be using an original xlsm as a template for
making

quotes, I recommend you copy the quote sheet to a new workbook and
work

with that so it's macro-free when opened by others. This approach

leaves the source file containing code being used as a 'master'

template for generating quotes.

Garry


Hi Garry,

I'm not pretending to understand all you have said, but I think I am
seeing the 'bad practice" of the copy method being used by the OP.

And I am responding to his request for code to some stuff. I offered
a solution that was workable to him, and he asked a follow up
question which is the gist of this thread.

I notice in my VB Editor Project Window about 6 or 7 workbook names
linked (probably the wrong terminology) to the workbook "Copy of
Vehicle Quotation Internal V7a".

If I click on one I can get a cascading display of all those
workbooks displayed in the editor screen.

Is this what you are warning me about?


In part. This is an indication, though, that each 'copy' of the
original contains code and so users get the annoying prompt to enable
macros when opening the file.

Another thing to consider is the original workbook should absolutely
contain no names with global scope to avoid the 'name conflict' prompt
when copying the original sheet (ie: template) to another file that
already contains other copies from the same source file.

Also, I see no reason why you can't suggest a different approach to
your OP!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion