Macro to close workbook and re-open new copy

G

Guest

I have a multiple page workbook we use to enter in activation information - a
different page for each of 3 types of activations. When you choose to save
it (macro) it asks for a reference number and saves the page using the
reference number as the file name. That all works great.

I now need to close the original file and re-open it so that the data is
cleared. How can I do this because as soon as I close it the macros cease to
work.
 
D

Dave Peterson

Maybe your code could use:
activeworkbook.savecopyAs filename:="somepath\whateveryouwant.xls"

Then you could either clean up the cells you need to clean up--or even ask.
Maybe the user would want to keep the existing values for a project that's
similar.
 
D

Dave Peterson

And since the code is in the same workbook, you'd probably want to use:
thisworkbook.savecopyas ....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top