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
is there a procedure view button in vs 2008 like there is in vb6
How do i display Chinese Simplified properly in VFP9 ?
Passing CDIalog to a thread
Memory Leak using CObArray
vs 2008 and 2 pc's
FOREACH LOOP - DOS
show tables and their fields in tsql?
The string was not recognized as a valid DateTime when I call the Stored Procedure
How to make outlook 2003 run at all times on Windows 2003 server
Compiled code in md*B* vs md*E* ?