Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default Code to open new workbook, prompt for 'save as' name.

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prompt to Open or Save the downloaded file Sreesha B.R Excel Discussion (Misc queries) 2 February 11th 08 03:41 PM
How to make Save prompt come up on Excel workbook Sammi Excel Discussion (Misc queries) 6 August 4th 06 11:10 PM
save prompt for user exit, but no save prompt for batch import? lpj Excel Discussion (Misc queries) 1 February 25th 06 02:08 AM
No save prompt when closing workbook budfrog130 Excel Discussion (Misc queries) 0 December 6th 05 01:54 PM
Can a MACRO prompt for the filename to open and/or save? Dave Peterson[_3_] Excel Programming 1 September 3rd 03 04:53 PM


All times are GMT +1. The time now is 01:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"