Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Make (save) a file by using macro recorder. | Excel Programming | |||
Make a file save and close itself based on the value of a cell | Excel Programming | |||
How do I make cell references return to normal? | Excel Discussion (Misc queries) | |||
how to save /make excel file as read only? | Excel Programming | |||
How can I make File-Save , File-SaveAs Menu disabled? | Excel Programming |