Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Take Two = Delete a Reference

Status
Not open for further replies.

eveCalypso

Programmer
Apr 29, 2003
134
GB
Hello All,

Sorry to bother you again!
All right, I managed to get almost everything working, except...
I need to be able to remove a reference at runtime...
How do I do that? I am testing that the reference exists, if it does, I want to remove it and re-assign. I can do everything except remove it!

I know of this:
ActiveDocument.VBProject.References.Remove(Reference),
but no matter what I put in the "Reference" field, I get errors (Type Mismatch etc). Apparently it is expecting:
"For the References collection, a reference to a type library or a project", but it does not like what I send.

Can anyone please help me with this one last thorn in my side!

Best Regards,
EvE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top