[AccessD] Mixed Versions

Rocky Smolin rockysmolin at bchacc.com
Sun Aug 2 15:10:05 CDT 2015


Dear List:
 
I created an app for a client in A2003 that exports stuff to Excel but using
VBA not the Transfer Spreadsheet function.  I used early binding because
that seems to work - even when the target machine has Office 2007 or 2010 -
the reference seems to resolve OK to the version excel on that machine.
 
However, the client recently upgraded to O2013 but without Access.  So
they're using Excel 2013 with Access 2003.  And of course, the export broke.
I thought that the solution would be to switch to late binding. Which works
on my O2003 machine fine.  But still does not work on the clients mixed
version machine.
 
It blows up on the line of code (but unfortunately I cannot find the email
that has the error message):
 
    objXLApp.Workbooks.Open Me.txtOutputFileName

The objects are DIMmed:
 
Dim objXLApp As Object
Dim objXLBook As Object
Dim objXLWS As Object

and the code snip is:
 
    Call CopyFileA(Me.txtRecievingInspectionCutStockTemplate,
Me.txtOutputFileName, False)

    Set objXLApp = CreateObject("Excel.Application")
    objXLApp.Workbooks.Open Me.txtOutputFileName
    Set objXLWS = objXLApp.ActiveSheet

where txtOutputFileName has the path and file name to be opened.
 
I'll try to get some more info but in the meantime is there some change I
have to make to syntax in  objXLApp.Workbooks.Open for Excel 2013? 
 
MTIA
 
Rocky
 


More information about the AccessD mailing list