Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi.
I have this code that i was running "beforeclose", however I adjusted it to try to make it a "beforesave" code however, it doesnt work. No error messages, but when i check my desktop, its not there. Any advice? Sub ThisWorkbook_BeforeSave(ByVal SaveAsUI As Boolean, ByRef Cancel As Boolean) Application.DisplayAlerts = False Set WshShell = CreateObject("WScript.Shell") ThisWorkbook.SaveAs Filename:=WshShell.SpecialFolders("Desktop") & "\" & ThisWorkbook.Name Application.DisplayAlerts = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Desktop Save Question | Excel Discussion (Misc queries) | |||
Save .xls as .txt In DeskTop | Excel Programming | |||
Save method and BeforeSave event | Excel Programming | |||
Detecting Save vs SaveAs in BeforeSave | Excel Programming | |||
BeforeSave sub won't save another workbook when triggered by another event sub | Excel Programming |