Breaking a reference via code

L

Lance McGonigal

Thanks all in advance for your help.

Does anyone have some sample code to break a reference to an addin titled
"LmLib". I set the reference each time I start the code but if the user
moves the application it fouls up.

On startup of the app I need to:

1. break the reference
2. add the reference back in from a file in the applications path titled
LmLib.mde (I have this working).

Thanks again.
 
M

M.L. Sco Scofield

I'm not sure if you can break a reference or if you need to or want to.

Have you simply tried removing the reference using the References collection
to delete the reference?

Although this little one-liner will error if you try to single step it, it
does work when simply run:

References.Remove References.Item("YourReferenceName")

Good luck.

Sco
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top