473,383 Members | 1,997 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,383 software developers and data experts.

Missing references in VBA code

Dear reader,

I still have a problem with my reference libraries.

In my frond end application a check procedure for missing references is
available.

The problem I confronted with is that in case there is a missing reference
each VBA code in the frond end runs into an error, also the reference check
procedure.

After unable the tick box in the VBA reference form for the missing
reference library the check procedure runs perfect.

How can I unable the tick box (remove tick in tick box) in the VBA reference
form for the missing (broken) reference before VBA code runs into an error.

Thanks for any help.

Kind regards,

Simon van Beek
Nov 13 '05 #1
3 4991
I gave you an answer for this a few hours ago. Did you need complete code?

Untested air-code:

Dim intLoop As Integer
Dim refCurr As Reference

For intLoop = References.Count To 1 Step -1
Set refCurr = References(intLoop)
If refCurr.IsBroken Then
References.Remove refCurr
End If
Next intLoop

(Note that you need to loop backwards through the collection, since if you
delete, say, reference 2, what used to be reference 3 becomes reference 2
and you'll end up skipping it)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"S. van Beek" <S.******@HCCnet.nl> wrote in message
news:43*********************@reader2.nntp.hccnet.n l...
Dear reader,

I still have a problem with my reference libraries.

In my frond end application a check procedure for missing references is
available.

The problem I confronted with is that in case there is a missing reference
each VBA code in the frond end runs into an error, also the reference
check
procedure.

After unable the tick box in the VBA reference form for the missing
reference library the check procedure runs perfect.

How can I unable the tick box (remove tick in tick box) in the VBA
reference
form for the missing (broken) reference before VBA code runs into an
error.

Thanks for any help.

Kind regards,

Simon van Beek

Nov 13 '05 #2
Douglas,

Tanks for your help, but the question how to remove the broken reference
remains.

The code
If refCurr.IsBroken then
Shows the broken reference, so far so goot, but the next stap
Reference.Remove refCurr
Gives an error
Error no.: 17
Error description: Can't perform requested operation"

The question remains how to remove the tick from the tick box in the VBA
code.

Tanks for any suggestion.

Kind regards,
Simon van Beek
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> schreef in bericht
news:F7********************@rogers.com...
I gave you an answer for this a few hours ago. Did you need complete code?

Untested air-code:

Dim intLoop As Integer
Dim refCurr As Reference

For intLoop = References.Count To 1 Step -1
Set refCurr = References(intLoop)
If refCurr.IsBroken Then
References.Remove refCurr
End If
Next intLoop

(Note that you need to loop backwards through the collection, since if you
delete, say, reference 2, what used to be reference 3 becomes reference 2
and you'll end up skipping it)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"S. van Beek" <S.******@HCCnet.nl> wrote in message
news:43*********************@reader2.nntp.hccnet.n l...
Dear reader,

I still have a problem with my reference libraries.

In my frond end application a check procedure for missing references is
available.

The problem I confronted with is that in case there is a missing reference each VBA code in the frond end runs into an error, also the reference
check
procedure.

After unable the tick box in the VBA reference form for the missing
reference library the check procedure runs perfect.

How can I unable the tick box (remove tick in tick box) in the VBA
reference
form for the missing (broken) reference before VBA code runs into an
error.

Thanks for any help.

Kind regards,

Simon van Beek


Nov 13 '05 #3
I'm sure I've had it work in the past, but I'm afraid I don't have the time
to try and create a situation where I have a broken reference to test right
now.

As I believe I said before, it's generally a poor idea to write your
application to remove broken references. Far better is to ensure that your
references don't break. You do this by having a minimal set of references,
and using Late Binding wherever possible.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"S. van Beek" <S.******@HCCnet.nl> wrote in message
news:43*********************@reader20.nntp.hccnet. nl...
Douglas,

Tanks for your help, but the question how to remove the broken reference
remains.

The code
If refCurr.IsBroken then
Shows the broken reference, so far so goot, but the next stap
Reference.Remove refCurr
Gives an error
Error no.: 17
Error description: Can't perform requested operation"

The question remains how to remove the tick from the tick box in the VBA
code.

Tanks for any suggestion.

Kind regards,
Simon van Beek
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> schreef in bericht
news:F7********************@rogers.com...
I gave you an answer for this a few hours ago. Did you need complete
code?

Untested air-code:

Dim intLoop As Integer
Dim refCurr As Reference

For intLoop = References.Count To 1 Step -1
Set refCurr = References(intLoop)
If refCurr.IsBroken Then
References.Remove refCurr
End If
Next intLoop

(Note that you need to loop backwards through the collection, since if
you
delete, say, reference 2, what used to be reference 3 becomes reference 2
and you'll end up skipping it)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"S. van Beek" <S.******@HCCnet.nl> wrote in message
news:43*********************@reader2.nntp.hccnet.n l...
> Dear reader,
>
>
>
> I still have a problem with my reference libraries.
>
> In my frond end application a check procedure for missing references is
> available.
>
> The problem I confronted with is that in case there is a missing reference > each VBA code in the frond end runs into an error, also the reference
> check
> procedure.
>
> After unable the tick box in the VBA reference form for the missing
> reference library the check procedure runs perfect.
>
>
>
> How can I unable the tick box (remove tick in tick box) in the VBA
> reference
> form for the missing (broken) reference before VBA code runs into an
> error.
>
>
>
> Thanks for any help.
>
>
>
> Kind regards,
>
> Simon van Beek
>
>



Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ping | last post by:
Hi, i am trying to : dim db As database and i have Access 2002. The object type "database" is not in the list and error message is "type mismatching " when run. i am wondering if the...
10
by: Bugs | last post by:
Hi I have distributed an mdb file that works fine on my PC using Access 2003, but when a copy I sent to someone running Access2003 he gets the error message "missing the intranet or the...
4
by: Zlatko Matić | last post by:
Hello. I prepared a .mde file using Access 2003. When I tried to use it on a computer with Access 2002 installed, it didn't work, because some references were missing (lower versions). Therefore...
0
by: S. van Beek | last post by:
Dear reader, I still have a problem with my reference libraries. In my frond end application a check procedure for missing references is available. The problem I confronted with is that...
2
by: S. van Beek | last post by:
Dear reader, For removing a reference in the VBA reference form I receive from Doug Steele the following code: ........... References.Remove refCurr
0
by: A.Black | last post by:
Hi, Trying to create a simple application in C# that requires access to Outlooks mail folders. Have downloaded sample code and that works fine however when I try to create my own project & code I...
6
by: Just Me | last post by:
My Task List contains the following: At least one reference is missing the 'Name' attribute. Any suggestion on how toe find which project is missing it? Solution contains 25 projects. ...
1
by: Ulrich Wisser | last post by:
Hi, after seeing some mysterious messages about missing from clauses I did turn on query logging. Unfortunately am I now more confused then before. Aug 25 09:22:38 balder postgres: LOG: ...
2
by: jodyblau | last post by:
I have noticed that when I move my database onto a different computer, I often get a message about some reference missing. So I go into the reference list, and find the one that says "Missing,"...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.