#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 161
Default XL Save As

Hi,

I've got a macro that runs a whole set of stuff and I would like to add a
final tweak so that the file saves itself with a unique date stamp. This is
run off a button click within a file.

The format will be:

SaveAs \\network_path\yymmdd My charts.xls

Can anyone please tell me the syntax to make XL save as a different file
name, please?

(As you can see, I'm not a programmer - learning this stuff as I go along)

TIA

Dave
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default XL Save As

Try this

Sub AATest()
mypath = "J:\Mydir\" 'Change to full path name
ThisWorkbook.SaveAs mypath & "Chart_" & Format(Date, "yyyy_mm_dd")
End Sub

Mike

"Risky Dave" wrote:

Hi,

I've got a macro that runs a whole set of stuff and I would like to add a
final tweak so that the file saves itself with a unique date stamp. This is
run off a button click within a file.

The format will be:

SaveAs \\network_path\yymmdd My charts.xls

Can anyone please tell me the syntax to make XL save as a different file
name, please?

(As you can see, I'm not a programmer - learning this stuff as I go along)

TIA

Dave

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 161
Default XL Save As

Perfect!

My thanks

"Mike H" wrote:

Try this

Sub AATest()
mypath = "J:\Mydir\" 'Change to full path name
ThisWorkbook.SaveAs mypath & "Chart_" & Format(Date, "yyyy_mm_dd")
End Sub

Mike

"Risky Dave" wrote:

Hi,

I've got a macro that runs a whole set of stuff and I would like to add a
final tweak so that the file saves itself with a unique date stamp. This is
run off a button click within a file.

The format will be:

SaveAs \\network_path\yymmdd My charts.xls

Can anyone please tell me the syntax to make XL save as a different file
name, please?

(As you can see, I'm not a programmer - learning this stuff as I go along)

TIA

Dave

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default XL Save As

Your welcome and thanks for the feedback

"Risky Dave" wrote:

Perfect!

My thanks

"Mike H" wrote:

Try this

Sub AATest()
mypath = "J:\Mydir\" 'Change to full path name
ThisWorkbook.SaveAs mypath & "Chart_" & Format(Date, "yyyy_mm_dd")
End Sub

Mike

"Risky Dave" wrote:

Hi,

I've got a macro that runs a whole set of stuff and I would like to add a
final tweak so that the file saves itself with a unique date stamp. This is
run off a button click within a file.

The format will be:

SaveAs \\network_path\yymmdd My charts.xls

Can anyone please tell me the syntax to make XL save as a different file
name, please?

(As you can see, I'm not a programmer - learning this stuff as I go along)

TIA

Dave

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
Save, save as, page setup dimmed out in unprotected excel sheet? ccKeithJ Excel Discussion (Misc queries) 3 December 14th 07 07:07 PM
Disable save, save as, but allow save via command button TimN Excel Programming 10 September 1st 06 07:05 PM
How to diasble save and save as menu but allow a save button hon123456 Excel Programming 1 June 12th 06 09:50 AM
Totally Disabling (^ save ) (Save as) and Save Icon – Which code do I use: harpscardiff[_10_] Excel Programming 8 November 10th 05 12:24 PM
Save Excel file - prompts to save - no Volitile functions used POWER CERTS Excel Worksheet Functions 2 November 1st 04 09:27 PM


All times are GMT +1. The time now is 02:32 AM.

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

About Us

"It's about Microsoft Excel"