Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Working with Custom ActiveX

Posted on 2002-03-12
2
Medium Priority
?
177 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
segan earned 200 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

722 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