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
based on one column value populate another column
Creative SB0460 - Windows 7
How to recover moved files and deleted files from Windows machine
Outlook 2007 SBS 2008 (exchange 2007) Password Screen Popping Up
SQL datetime issue: The following 2 sections of code produce different results.
How do I programmatically set the recordsource in a subreport?
Assign default value to array
ASP.Net asynchronous sql execution
Advice needed... getting data from another application into Access
Modify a PARAM tag value within C#