Solved

Working with Custom ActiveX

Posted on 2002-03-12
2
172 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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Write data from SQL to CSV file - position 1 61
Vb.net 2008 2 59
vb6 - Transfer from MSHFlexgrid1 to xls issue 8 52
fso.FolderExists("\\server\HiddenFolder$") 4 66
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

809 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