PDA

View Full Version : Access error 429: ActiveX component can't create object



Raddrummer
03-25-2009, 11:27 AM
Hi everyone,

I'm trying to open a Visio document from Access and am getting an error that says "ActiveX component can't create object". I checked the reference library and couldn't find anything out of sorts there, but I'm no expert so I could be overlooking something. Any ideas on how to fix?

Thanks!

Here is the code I'm using:

Public Sub OpenDocument_OrgChart()

Dim vsoDocument As Visio.Document
'Open an existing document.
Set vsoDocument = Documents.Open("C:\Documents and Settings\SLozano\My Documents\OrgChart.htm")
End Sub

hansup
03-25-2009, 02:07 PM
I'm trying to open a Visio document from Access and am getting an error that says "ActiveX component can't create object". I checked the reference library and couldn't find anything out of sorts there, but I'm no expert so I could be overlooking something. Any ideas on how to fix? When you look at your selected references, do you have one of these checkboxes marked?

* For Visio 2007, the Microsoft Visio 12.0 Type Library check box.
* For Visio 2003, the Microsoft Visio 11.0 Type Library check box.
* For Visio 2002, the Microsoft Visio 2002 Type Library check box.

Do you have any version of Visio installed on the machine where you're running your OpenDocument_OrgChart subroutine?


Public Sub OpenDocument_OrgChart()

Dim vsoDocument As Visio.Document
'Open an existing document.
Set vsoDocument = Documents.Open("C:\Documents and Settings\SLozano\My Documents\OrgChart.htm")
End Sub If Visio is installed, you could try late binding to avoid setting a reference.
Public Sub TestVisio()
Dim appVisio as Object
Set appVisio = CreateObject("Visio.Application")
appVisio.Quit
Set appVisio = Nothing
End Sub That code won't do anything other than start Visio and shut it down again immediately. Unless Visio is not installed ... in which case, it will tell you "ActiveX component can't create object" again.

Good luck,
Hans

Raddrummer
03-25-2009, 03:43 PM
Hansup. Thanks so much. This worked perfectly!:bow:

Rad