Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Macro Save File (Unique file name)
I currently have a code which I have listed below which will save a file when
the user selects the button. I have some users who will need to save two or more files, which directs them to overwrite the file since currently, there is no identifier in the file name. The indentifier that I would like to add is on another spreadsheet in the same workbook. (Worksheet name: Intro--Start Here; cell: G13) Does anyone know how I can add this information to the filename so that each file saved will have a unique name? Thanks for any suggestions. Dim strPath As String Dim strFileName As String strPath = Application.DefaultFilePath & "\" strFileName = "xxx" ActiveWorkbook.SaveAs strPath & strFileName, FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False ActiveWindow.Close Sheets("Intro--Start Here").Select MsgBox ("xxx") End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Defining a Cell for Save as file name | Excel Discussion (Misc queries) | |||
save original data after macro is run again | New Users to Excel | |||
Macro excel save | Excel Discussion (Misc queries) | |||
Opening a file with a Macro | Excel Discussion (Misc queries) | |||
Save & Save As features in file menu of Excel | Excel Discussion (Misc queries) |