View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_3_] Jim Thomlinson[_3_] is offline
external usenet poster
 
Posts: 983
Default Code to open new workbook, prompt for 'save as' name.

To get a new workbook you can use code similar to

dim wbk as workbook

set wbk = workbooks.add

To save this new workbook you can use

wbk.saveas "C:\MyBook.xls"

HTH

"Mark" wrote:

I have created extensive code to derive reports off a current workbook.

What I want to do now is create a macro in my original workbook that will
open a new workbook, run my report code, and then prompt for a save_as name.

The most important part is really just getting a macro to open a new
workbook. I realize the code for my report generating will need to be
modified to refer to the correct pages.