Solved

Working with Custom ActiveX

Posted on 2002-03-12
2
171 Views
Last Modified: 2010-05-02
facts:
1. I created an ActiveX Control. and compiled it. Automatically, VB registered the control.  The project is in c:\MyActiveX
2. I used that control in my other project (Payroll System).  So, now its referencing the ocx file from the folder c:\MyActiveX.

my question:
What if I want to move the folder c:\MyActiveX to drive D:?  How can I open the Payroll project without having errors... Coz right now, the ActiveX controls in my payroll project becomes PictureBoxes.  How to I tell my Payroll project that the folder has been moved to drive D:?
0
Comment
Question by:killer5
2 Comments
 

Accepted Solution

by:
segan earned 50 total points
ID: 6859541
Hi,

Whenever you open the project which uses that OCX, in design mode, VB will try to locate OCX in the same folder where it was registered.

To get pass this problem, open the .frm file in notepad and modify the path, which would something like,

Object = "{06799C28-B918-4A68-9614-7EF1ED27C4D1}#1.0#0"; "C:\MyOCX.ocx"

And better solution to this kind of problems is,

Allways keep your controls as UserControl Modules in the same project till it completed.

Selva.
0
 
LVL 5

Expert Comment

by:Netminder
ID: 6861231
Grade changed.

killer5,

This response was complete, and even went beyond your request with some valuable advice.

Netminder
Community Support Moderator
Experts Exchange
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VBA error replacing data 6 36
using web browser with BING 40 110
Search combo error "Data Type Mismatch in Criteria Expression" 2 49
Macro Excel - Multiple If conditions 2 62
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now