Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all, *I have code below which save the current worksheet in
folder "Record" with the name "Rec" Private Sub CommandButton1_Click() Me.Select Me.Copy ActiveWorkbook.SaveAs Filename:="C:\Documents\Record\Rec.xlsm", FileFormat:= _ xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False ActiveWindow.Close End Sub I want to give name "Rec" to all my files in same folder but I want macro to put 1 , 2 , 3… etc at the end of every file name. How can I change above macro that it should first check the folder "Record" if there is any file with the name "Rec" and if there is then it should put 1 at the end of the file and save it. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
when i save xls file, debug script is running and canno't save fil | Excel Discussion (Misc queries) | |||
Excell2003 (SP-1) File > Save and File > Save As.. grayed out | Excel Discussion (Misc queries) | |||
Save Excel file - prompts to save - no Volitile functions used | Excel Worksheet Functions | |||
Excel marcos firing on file save as but not file save | Excel Programming | |||
Save File to Another Directory, but not change Users File Save location | Excel Programming |