Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm having trouble getting this code to work. The dialog box come up and
you can navigate to the directory you want, but the file still saves to the original file name in the original directory. Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) a = MsgBox("Are sure you want to save this workbook?", vbYesNo) If a = vbNo Then Cancel = True Else SaveAsUI = True fileSaveName = Application.GetSaveAsFilename("TCR" & Cells(20, 29) & ".xls", fileFilter:="Excel Files (*.xls),*.xls") End If End sub What I want to do is force the user to save the file as TCR plus whatever is in cell AC20, ie TCRSomeone.xls, but I'd like them to be able to save it in the directory they choose. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
HELP!!!! Calling a sub from Workbook_BeforeSave | Excel Discussion (Misc queries) | |||
Workbook_BeforeSave() in xla | Excel Programming |