koltregaskes
New Member
- Joined
- Feb 8, 2005
- Messages
- 15
I have a macro that needs to go back and forth between an Excel macro. I have the script to open the Excel workbook and activate the sheet I'll be using then thereafter it needs to go back and forth to update dates and times.
I have the following code that opens the workbook each time to update these dates and times but is there a way to simply switch to the workbook instead and thus speeding up the process?:
I have the following code that opens the workbook each time to update these dates and times but is there a way to simply switch to the workbook instead and thus speeding up the process?:
Code:
Dim xl As Object
Set xl = CreateObject("Excel.Application")
xl.Workbooks.Open ("\\drive\folder\workbook.xlsm")
xl.Visible = False
xl.Run "macro"
xl.ActiveWorkbook.Close (False)
xl.Quit
Set xl = Nothing