J
Johnnyboy5
How do I use two cells to make up the file save name.
eg. A1 and D1 (what ever)
Thanks
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
mydrive = "H:"
mydir = "Temp"
myname = Sheets("sheet1").Range("a1")
ms = mydrive & "\" & mydir & "\" & myname & Format$(Date, " dd-mm-
yyyy") & "xls"
ActiveWorkbook.SaveCopyAs Filename:=ms
' Place the current files path and filename in the titlebar:
Windows(1).Caption = ActiveWorkbook.FullName
' Place your own application name in the titlebar:
Application.Caption = "SPICE SHEET FOLDER"
Cancel = True
ActiveWorkbook.Saved = True
msg = MsgBox("The workbook has been saved as " & ms, vbInformation +
vbOKOnly, "Save As")
Application.DisplayFullScreen = False
End Sub
eg. A1 and D1 (what ever)
Thanks
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
mydrive = "H:"
mydir = "Temp"
myname = Sheets("sheet1").Range("a1")
ms = mydrive & "\" & mydir & "\" & myname & Format$(Date, " dd-mm-
yyyy") & "xls"
ActiveWorkbook.SaveCopyAs Filename:=ms
' Place the current files path and filename in the titlebar:
Windows(1).Caption = ActiveWorkbook.FullName
' Place your own application name in the titlebar:
Application.Caption = "SPICE SHEET FOLDER"
Cancel = True
ActiveWorkbook.Saved = True
msg = MsgBox("The workbook has been saved as " & ms, vbInformation +
vbOKOnly, "Save As")
Application.DisplayFullScreen = False
End Sub