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
iPhone 3G and SBS 2003/Exchange Activesync
ISA Server and Cisco equipment -- will it work/help?
What is QTSTimer?
Cannot Print Individual Page From Word Document
Passing data between two Windows Apps - ActiveX or DDE?
Set size and position of a form
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
Writing a File To a CD from Access?
Cannot rename reports in Access 2007 runtime - bug?
Denied GPO