By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,649 Members | 1,765 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,649 IT Pros & Developers. It's quick & easy.

How to delete the missing References for VBA

P: n/a
Dear reader,

For removing a reference in the VBA reference form I receive from Doug
Steele the following code:

...........

References.Remove refCurr

..........

By running this code the following error occur:

Error no. 17

Error description: Can't perform requested operation

The question is how can I unable the tick box (remove tick form tick box) in
the VBA references form for the missing (broken) references.

Thanks for any help.

Kind regards,

Simon van Beek
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I suggest you perform this task on a machine that has the "Missing"
references installed, after which, you can uninstall those references or
move the project to the machine that is missing the references.

It might prove beneficial if you post the names of the missing references...

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

For removing a reference in the VBA reference form I receive from Doug
Steele the following code:

..........

References.Remove refCurr

..........

By running this code the following error occur:

Error no. 17

Error description: Can't perform requested operation

The question is how can I unable the tick box (remove tick form tick box)
in
the VBA references form for the missing (broken) references.

Thanks for any help.

Kind regards,

Simon van Beek

Nov 13 '05 #2

P: n/a

Seeing the whole of the code would be more useful as in the snippet you show
it would appear that refCurr is a variable, we really need to know the code
around that line.

If you are doing something like this for example

Dim refCurr As Reference

For Each refCurr In References
If refCurr.IsBroken Then
References.Remove refCurr
End If
Next

Then this will fail (if you do have Missing references)

This on the other hand should succeed

Dim refCurr As Reference
Dim intX As Integer

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

.... unless the Missing reference is an inbuilt one, but the code could be
changed to

Dim refCurr As Reference
Dim intCount As Integer

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

and then you really must disambiguate when checking references in case one
of them is broken so the code should really be.

Dim refCurr As Access.Reference
Dim intCount As Integer

For intCount = Access.References.Count To 1 Step -1
Set refCurr = Access.References(intCount)
If Not refCurr.BuiltIn Then
If refCurr.IsBroken Then
Access.References.Remove refCurr
End If
End If
Next

Now do you see why the surrounding code is important ?

--
Terry Kreft
MVP Microsoft Access
"S. van Beek" <S.******@HCCnet.nl> wrote in message
news:43*********************@reader1.nntp.hccnet.n l...
Dear reader,

For removing a reference in the VBA reference form I receive from Doug
Steele the following code:

..........

References.Remove refCurr

..........

By running this code the following error occur:

Error no. 17

Error description: Can't perform requested operation

The question is how can I unable the tick box (remove tick form tick box) in the VBA references form for the missing (broken) references.

Thanks for any help.

Kind regards,

Simon van Beek

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.