Code: Select all
Sub Main<br style="font-family: Courier New,Courier,mono; font-style: italic;"><br style="font-family: Courier New,Courier,mono; font-style: italic;"> Dim objExcel As Object<br style="font-family: Courier New,Courier,mono; font-style: italic;"> Dim wbkExcel1 As Object<br style="font-family: Courier New,Courier,mono; font-style: italic;"> Set objExcel = CreateObject( "Excel.Application")<br style="font-family: Courier New,Courier,mono; font-style: italic;"><br style="font-family: Courier New,Courier,mono; font-style: italic;"> objExcel.Visible = False<br style="font-family: Courier New,Courier,mono; font-style: italic;"> objExcel.Workbooks.Open Filename:="\\Server-1\production_share\Test Auto Bucket\Automates Tasks and Other Stuff\Macro Storage\PERSONAL.XLSB"<br style="font-family: Courier New,Courier,mono; font-style: italic;"> objExcel.Workbooks.Open Filename:= %STRFILE%<br style="font-family: Courier New,Courier,mono; font-style: italic;"><br style="font-family: Courier New,Courier,mono; font-style: italic;"> objExcel.Run "PERSONAL.xlsb!Lighthouse_Converter"<br style="font-family: Courier New,Courier,mono; font-style: italic;"> objExcel.Run "PERSONAL.xlsb!validateLighthouseFormat"<br style="font-family: Courier New,Courier,mono; font-style: italic;"><br style="font-family: Courier New,Courier,mono; font-style: italic;"> Set wbkExcel1 = objExcel.ActiveWorkbook<br style="font-family: Courier New,Courier,mono; font-style: italic;"> 'Set wbkExcel1 = objExcel.ActiveWorkbook.Worksheets(1)<br style="font-family: Courier New,Courier,mono; font-style: italic;"> wbkExcel1.Close SaveChanges:= True<br style="font-family: Courier New,Courier,mono; font-style: italic;"><br style="font-family: Courier New,Courier,mono; font-style: italic;"><br style="font-family: Courier New,Courier,mono; font-style: italic;"> objExcel.ActiveWorkbook.Close False<br style="font-family: Courier New,Courier,mono; font-style: italic;"><br style="font-family: Courier New,Courier,mono; font-style: italic;"> objExcel.Quit<br style="font-family: Courier New,Courier,mono; font-style: italic;"><br style="font-family: Courier New,Courier,mono; font-style: italic;">End Sub<br>