Microsoft
Software
Hardware
Network
Question : Excel marco (close excel file and auto rename)
Hi,
How can i command vba , when i close excel file and then execute the following command.
Sub SaveFile()
ThisWorkbook.SaveAs "D:\BACKUP\" & "SN" & Sheet1.Cells(2, 8).Text & ".xls"
End Sub
Regards
Stanley
Answer : Excel marco (close excel file and auto rename)
Use 'BeforeClose' event of workbook.
Private Sub Workbook_BeforeClose(Cance
l As Boolean)
Call SaveFile
End Sub
Random Solutions
How to find out who has an Access 2003 database locked
Sort a SortedDictionary based on value, not key - C#.net MVC
SBS 2003 ISA 2004 LAT problem
Cannot open database -- VBA Project corrupt
Can't run eseutil on Exchange 2k3 server
Preventing Outlook Calendar Conflicts
Change default editor in Outlook 2010 Beta.
Microsoft SQL 2005
How to host a web site on IIS
Visual Studio 2008 Pro Trial does work with SQL 2008 CTP Trial