My client is upgrading from Office 2010 to Office 2016 so I need to get the following code to work but I don't understand why the following won't work.
I am getting the following error unless I set Excel to be visible:
Runtime Error -2147417851 (80010105)
Method 'Open' of object 'Workbooks' failed
dim objXL as Object
Dim objWkb As Object
Set objXL = New Excel.Application
stDealerAC = "ABBEYNW"
'objXL.Visible = True
Set objWkb = objXL.Workbooks.Open("H:\order book\order_status\" & stDealerAC & ".xls")
Question: How can I get it to run without objXL.Visible = True?