Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Macro to append number to file name

Greetings,

I am trying to find the VB code to create a process where the workbook can
be saved on the same folder without overwriting the existing workbook.
Multiple people will be dropping their copies of the workbook onto the same
folder.

The goal is to have the folder contain files to look like:
Master (1),
Master (2),
Master (3), etc.

Thanks for your help!
Rick

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default Macro to append number to file name

Sub saveworkbookas()
dim i as long
dim fname as string
For i = 1 To 3
fname = "Master" & i & ".xls"
MsgBox fname
ActiveWorkbook.SaveAs Filename:=fname
Next i
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Guitarzann" wrote in message
...
Greetings,

I am trying to find the VB code to create a process where the workbook can
be saved on the same folder without overwriting the existing workbook.
Multiple people will be dropping their copies of the workbook onto the
same
folder.

The goal is to have the folder contain files to look like:
Master (1),
Master (2),
Master (3), etc.

Thanks for your help!
Rick


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
Append text file Jeff Excel Discussion (Misc queries) 6 October 8th 07 05:56 PM
Trying to append to file using an array Susan Hayes Excel Programming 1 January 5th 06 08:55 AM
File Append & Opposite Christmas May[_2_] Excel Programming 0 November 30th 05 05:33 AM
append file on e-mail Sylvian[_9_] Excel Programming 0 September 7th 05 07:57 PM
append file on e-mail Sylvian Excel Discussion (Misc queries) 0 September 7th 05 07:23 PM


All times are GMT +1. The time now is 05:06 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"