473,378 Members | 1,544 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

VBA, interesting question

50
Hi guys,
As a newer to vb and vba, I design a small program by Access 2000 running on server. In its Reference, I've used a special commercial DLL, let's call it a.dll.
Some clients have set a shortcut which links to the small program in server, so also they can run this program.
But in some of client computers, they don't have a.dll, so my design is if there is no a.dll, the program will not use the functions of a.dll.
But the only problem is, because it's a shortcut at the client side, and at server side, the Reference has already been set up. so when you double click the shortcut at the client side, the Access2000 will report errors, a.ll missing.
Is there automatic system method to get around this error beforehand? I mean let system not check, or in my program to cancel the Reference.
Thank you!
Jun 26 '07 #1
1 1183
kadghar
1,295 Expert 1GB
Hi,

I've just answered something similar, its a way to check the libraries and add them in your computer. But im not quite sure if it'll still working when you share computeres.. i'd say it does, but .. who knows.

So.. (since im new to this, i dont know how to link you to another question, then i'll copy paste the answer here.

Oh, and this one is for excel, i think you'll have to change the ThisWorkbook to something like ThisQuery (or whatever Acces uses... i'm not good at it neither)

Good Luck

If you want to check what references you have in your vba in excel, use:

ThisWorkbook.VBProject.References

Its a list, you can use properties such as Item, AddFromFile , etc

and each member of the list will have a GUID (an identification number).. for example, the GUID for Microsoft Office Web Components 9 is 0002E540-0000-0000-C000-000000000046.

Thats an easy way to identify references.

E.g. if you want to check out if you have this reference, you can do something like:


Code: ( vb )
Sub RefCheck()
Dim Int1 as Integer
With ThisWorkbook.VBProject.References
For Int1 = 1 To .Count
If .Item(Int1).GUID = "{0002E540-0000-0000-C000-000000000046}" Then
Exit Sub
End If
Next
.AddFromFile ("C:\MSOWC.DLL")
End With
End Sub


Hope this helps
Jun 26 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: pythonUser_07 | last post by:
Is this the correct place to post a jython question? I posted the following in the jython group, but I figured I'd post here too: _________________________________________ I am assuming that...
8
by: ºa¤Ö | last post by:
I find a interesting question, and I cannot solve it @.@ If i want to insert unicode data, I need using recordset.addnew instead of using "insert into table" query or "stored procedure" All...
2
by: Dylan Phillips | last post by:
A strang error is occurring when I run the following code: SqlConnection c = new SqlConnection(); c.ConnectionString = "Initial Catalog=Northwind;user id=sa;password=kat1ie;Data Source=server";...
7
by: git_cs | last post by:
Hey, guys and gals Somedays ago, I had asked for the DES algorithm in C language. Although I have written the algorthim in C myself, I am facing a peculiar problem, which I hope some of u guys and...
7
by: Jax | last post by:
I have this code, behold: string message = "Are you sure? You will lose this customer forever. (Well you'll have re-create from scratch)"; string caption = "Delete"; MessageBoxButtons buttons...
12
by: Dino M. Buljubasic | last post by:
I have two applications App1 and App2. App1 is just checking for new version of App2. If it finds newer version of App2 it will download App1 AND App2. (both of them). That is what I am...
6
by: Claude Yih | last post by:
Hi, everyone. I noticed an interesting thing about fread() this afternoon. Well, I can't see why so I post this message in the hope of getting some explanation. Please help me. I wrote the...
26
by: v4vijayakumar | last post by:
Happened to see my old (last millennium) c code. Almost forgot that I wrote it . It is interesting. :-) int sqrt(int no) { int t; no = t * t; return t; }
5
by: Will Honea | last post by:
I've hit an interesting trap trying to migrate data off an OS/2 server running version 7.2 (fp14) over to 8.2 on Linux. Seems that one table has a column defined in the DDL as "BIGINT NOT NULL...
126
by: jacob navia | last post by:
Buffer overflows are a fact of life, and, more specifically, a fact of C. All is not lost however. In the book "Value Range Analysis of C programs" Axel Simon tries to establish a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.