View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
RB Smissaert RB Smissaert is offline
external usenet poster
 
Posts: 2,452
Default Recompile com object while excel is running

This is code that is run from within VBA in an .xla add-in:

Sub RemoveReference(strReference As String)

Dim r As Reference

For Each r In ThisWorkbook.VBProject.References
If r.Name = strReference Then
ThisWorkbook.VBProject.References.Remove r
Exit Sub
End If
Next

End Sub

It will need some alterations if you want to run this from your C# IDE,
but this is the principle of it.


RBS



wrote in message
oups.com...
So is there a way to tell excel to drop the reference?