Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / August 2005

Tip: Looking for answers? Try searching our database.

Using an ActiveX component dynamically

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shiva - 09 Aug 2005 08:44 GMT
Hi,

I've downloaded and registered the ActiveX component uFREEDB in Access 2002.
The list of ActiveX components being installed displays the component
FREEDBControl.uFREEDB so it has been registered properly.

I want to create this component dynamically using some VBA. I tried this but
it doesn't work:

Dim uFREEDB1 As uFREEDB
Set uFREEDB1 = New FREEDBControl.uFREEDB

The Set-command cannot be compiled, the error "Invalid use of New keyword"
is displayed. I'm not sure if I have to use the set command anyway,  but
just the Dim-command is insufficient.

So how do I fix this?

Thanks in advance!
John Nurick - 10 Aug 2005 06:39 GMT
Hi Shiva,

I've never used the uFREEDB controlm but not all objects are compatible
with the New operator. Try
   Set uFREEDB1 = CreateObject(FREEDBControl.uFREEDB)
instead.

>Hi,
>
[quoted text clipped - 15 lines]
>
>Thanks in advance!

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
Shiva - 10 Aug 2005 22:24 GMT
Thanks a lot John, this did the trick!

> Hi Shiva,
>
[quoted text clipped - 29 lines]
>
> Please respond in the newgroup and not by email.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.