LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default VBA code for Excel File Save As

Hi,

I'm building a code where at some point I need to save the file to a new location with a specific file name, which is also specified by the code. I would like to be prompted for this but it only saves if I specify the path.

This is the bit I have already written and can't go further:

Dim NewName As String

NewName = mRateName & " " & Validade & ".xls"

If MsgBox("Save file as " & NewName & "?", vbYesNo, Save) = vbNo Then

Exit Sub

ActiveWorkbook.SaveAs FileName:=NewName

Can anyone help me?

Thanks
 
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
How to code the Macro to save and close a file? Eric Excel Discussion (Misc queries) 7 June 10th 07 03:28 PM
FILE 'SAVE AS' IN VBA CODE Sally Excel Discussion (Misc queries) 3 June 28th 06 03:41 PM
Macro VBA code to name Save-As file Dolores Excel Worksheet Functions 7 December 28th 05 11:24 PM
Save Excel file - prompts to save - no Volitile functions used POWER CERTS Excel Worksheet Functions 2 November 1st 04 09:27 PM
prevent user from saving file to a folder but allow my code to save from behind. susie Excel Programming 3 July 25th 03 03:01 PM


All times are GMT +1. The time now is 08:55 PM.

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"