|
Visual Basic (VB and VBA) |
|
Copyright 1999-2001 Christopher Greaves. All rights reserved. Home Page and email to [email protected] |
| If in doubt, record a macro and inspect the entrails! |
Please read the DISCLAIMER.
Here is an INDEX to all the procedures.
You will probably need one copy of my GLOBAL DECLARATIONS.
Public Function NukeReference()
' Re: Unset a reference via code? [Jefferson Scher Post#: 19220 / re: 19184 ]
' It 's not obvious, and after an hour I want to shoot myself in the head over this one: contrary to the documentation, leave out the
' parentheses on the Reference object to be deleted!
' Example: http://support.microsoft.com/support/kb/articles/Q213/5/29.ASP
' Anyway, at long last, this will now work:
' (Of course, use whatever search strings in the .Name or .FullPath make sense to you.)
Dim aRef As Reference, colRefs As References
Set colRefs = VBE.ActiveVBProject.References
For Each aRef In colRefs
'Debug.Print aRef.Name & "; " & aRef.FullPath & "; " & aRef.Type
If InStr(1, aRef.FullPath, "palmapp", vbTextCompare) > 0 Then
colRefs.Remove aRef
End If
Next
End Function
| We all knew nothing when we started … |
|
Home Page and Contact Information Send email to [email protected]. This page was last updated Thursday, November 15, 2001 |