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
SBS 2008 pop three setup.
Excel Multiple Data Validation
Creating a Word Template
How to get file path/name after drag drop.
adding a text box to a radio button list?
Opening explorer with a batch file.
CALLING .CS .ASMX WEB SERVICES JAVASCRIPT AND GETTING A RESPONSE
sql string in VB
Using subquery to supply VALUE in INSERT statement
pause code in sql2008 through Access07