I have an Object Reference issue. My PC has Microsoft Excel 12.0 Object Library and the PCs I'm going to install on have Microsoft Excel 11.0 Object Library. I've read about late binding, but I'm not sure how to implement the code. Here's the start of my current code:
Dim oApp As Object
Set oApp = CreateObject("Excel.Application")
oApp.Visible = True
'Open the Workbook: Local
oApp.Workbooks.Open "c:\AnnualREport.xls"
DoCmd.SetWarnings False
'Sheet Settings
With oApp.ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
oApp.ActiveSheet.PageSetup.PrintArea = "$A$1:$O$8"
Dim oApp As Object
Set oApp = CreateObject("Excel.Application")
oApp.Visible = True
'Open the Workbook: Local
oApp.Workbooks.Open "c:\AnnualREport.xls"
DoCmd.SetWarnings False
'Sheet Settings
With oApp.ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
oApp.ActiveSheet.PageSetup.PrintArea = "$A$1:$O$8"