Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 7th, 2009, 04:49 AM
Authorized User
 
Join Date: Mar 2008
Posts: 74
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via ICQ to sektor
Default How to programmatically register class in OS registry with VBA?

I created class library in VB .NET and want to load it with Application.VBE.ActiveVBProject.References.AddFrom File, but VBA shows following error: "Run-time error 429: ActiveX component can't be created VBA".

I looked thru Internet and found out that class library should be registered with OS. So, how to programmatically register this library with VBA?

Last edited by sektor; September 7th, 2009 at 05:07 AM..
 
Old September 7th, 2009, 11:17 AM
JP JP is offline
Authorized User
 
Join Date: Apr 2008
Posts: 57
Thanks: 1
Thanked 3 Times in 3 Posts
Default

This is a VBA forum, I don't know how much .NET help you can get here.

http://support.microsoft.com/kb/302094

--JP

Quote:
Originally Posted by sektor View Post
I created class library in VB .NET and want to load it with Application.VBE.ActiveVBProject.References.AddFrom File, but VBA shows following error: "Run-time error 429: ActiveX component can't be created VBA".

I looked thru Internet and found out that class library should be registered with OS. So, how to programmatically register this library with VBA?
 
Old September 7th, 2009, 11:59 PM
Authorized User
 
Join Date: Mar 2008
Posts: 74
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via ICQ to sektor
Default

No, this was of no help. :(
The thing is I need programmatic linking .NET library by using TLB file.
 
Old September 18th, 2009, 09:28 AM
JP JP is offline
Authorized User
 
Join Date: Apr 2008
Posts: 57
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Why not use late bound references? Declare As Object and use CreateObject to instantiate the application you want.

--JP

Quote:
Originally Posted by sektor View Post
No, this was of no help. :(
The thing is I need programmatic linking .NET library by using TLB file.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch14;get Class not register error with Code Example clay5050 BOOK: Beginning C# 3.0 : An Introduction to Object Oriented Programming ISBN: 978-0-470-26129-3 5 December 23rd, 2009 07:17 AM
can i have more than one tomcat on same os deepak Apache Tomcat 3 June 21st, 2008 05:38 AM
OS chaos2003 Linux 1 August 26th, 2003 12:12 PM
JRun4 for Mac OS + Mac OS X's Java 1.4.1 elbicho J2EE 0 June 27th, 2003 12:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.