Re: eReference error message




"Greg Meade" <Killer@xxxxxxxxxxxxx> wrote in message
news:59DFFF2E-F6A8-4AE7-8027-88B4CEA6D028@xxxxxxxxxxxxxxxx
> Thanks Mike. Here is my code. I have a form with a command button on it.
> This is the whole thing,. When I click the button I get a red-x msg box
> captioned "eReference Embedding" with the message "Unknown Application
> Version". There is also a VB error message, "Runtime Error -2147417846
> (8001010a) Automation Error The message filter indicated that the
> application is busy"
>
> There is a Reference to Microsoft Excel 11.0 Object Library (EXCEL.EXE)
>
> Private Sub Command1_Click()
>
> Dim oXL As Excel.Application
>
> Set oXL = New Application
>
>
>
> End Sub


The code looks OK. Are you getting this error on your development PC (which
presumably has Office 2003 installed) or are you getting this error on
another PC which doesn't have Office 2003 (IOW, the target PC has an older
version of Office)? If so, then try late-binding as Peter suggested, but
don't include the version number unless you want to explicitly instantiate
Excel 11 and that version of Excel is what's installed.

FWIW, your code works OK for me (and I also have Office 2003 installed).
But your object variable should probably be at a different scope. Since
you've declared it local, when that event procedure ends, the object
variable will go out of scope and that instance of Excel you created will
automatically be terminated (I think this behavior is different than with
earlier versions of Office apps, which did not automatically terminate when
the object variable went out of scope). That might be contributing to the
problem. I have no idea what "eReference Embedding" could refer to. That
doesn't seem like a caption that Excel would use; at least I've never come
across it. Do you have any Excel add-ins or anything else that
automatically start or run when an instance of Excel is created? If so,
that could also be contributing to the problem. (I'm kind of just grasping
at straws here).


--
Mike
Microsoft MVP Visual Basic



.


Loading