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

x
?
Solved

XL97 vba references

Posted on 1998-12-22
1
Medium Priority
?
199 Views
Last Modified: 2010-05-03
I have a custom written 16 bit exe that I can add as a reference in XL vba. This enables me to use the object browser. However when I try to run a worksheet that uses this reference on another machine (which has the exe in the same place) excel complains about a missing reference - how do references work and how do I overcome this problem.
0
Comment
Question by:egunn
[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
1 Comment
 
LVL 1

Accepted Solution

by:
jeffcameron earned 100 total points
ID: 1451896
To overcome this problem, you can indirectly reference it by string using the CreateObject(class name as string) this will eliminate the need for the program to store the guid and reference by this.  The problem with design time referencing like you are doing is that if the program was compiled at different times then it will have two different GUIDs and will cause this problem.  Otherwise you will have to compile both the program on the other machine and the program on the development machine at the same time.  Also on install to the other machine you must register the program with the windows registry.  you can use the program C:\WINDOWS\SYSTEM\REGSVR32.EXE filename to do this or most setup software gives you this option.  16bit however this may or may not work, you will have to experiment.  Try this and let me know how it goes.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

670 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