I have borrowed some code from the board which i have slightly changed to suit my needs. It basically saves the file updating the version number each time and also includes a cell value and the date.
Only problem is it would be better for me if the path could be chosen using browse. Reason being that the file is used by a lot of people with different systems and currently the path is specified in the code.
Private Sub SaveFile_Click()
Dim sFileName, tFilename As String, sPath As String
sPath = "C:\Test_Files\"
tFilename = Range("b8")
sFileName = Format(Now(), "ddmmmyy")
Num = 1
Do While Dir(sPath & tFilename & sFileName & ".xls") <> ""
sFileName = Format(Now(), "ddmmmyy")
Num = Num + 1
VerNum = "_Ver" & Num
sFileName = sFileName & VerNum
Loop
ActiveWorkbook.SaveAs (sPath & tFilename & sFileName)
SaveFile.Enabled = False
End Sub
Cheers
Only problem is it would be better for me if the path could be chosen using browse. Reason being that the file is used by a lot of people with different systems and currently the path is specified in the code.
Private Sub SaveFile_Click()
Dim sFileName, tFilename As String, sPath As String
sPath = "C:\Test_Files\"
tFilename = Range("b8")
sFileName = Format(Now(), "ddmmmyy")
Num = 1
Do While Dir(sPath & tFilename & sFileName & ".xls") <> ""
sFileName = Format(Now(), "ddmmmyy")
Num = Num + 1
VerNum = "_Ver" & Num
sFileName = sFileName & VerNum
Loop
ActiveWorkbook.SaveAs (sPath & tFilename & sFileName)
SaveFile.Enabled = False
End Sub
Cheers