Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I am accessing Excel object from a C# plugin. Sometimes in my target documents there are missing Compoment references, which I should remove. I use the following fragment of code to do this: |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I am accessing Excel object from a C# plugin. Sometimes in my target documents there are missing Compoment references, which I should remove. Sorry, I sent it incomplete mistakenly. Here's the whole message. --- I use the following fragment of code to do this: for (int j = 1; j <= wbk.VBProject.References.Count; j++) { VBIDE.Reference myref = wbk.VBProject.References.Item(j); if (myref.IsBroken == true) { wbk.VBProject.References.Remove(myref); } } The problem is that I get the following exception: for (int j = 1; j <= wbk.VBProject.References.Count; j++) { VBIDE.Reference myref = wbk.VBProject.References.Item(j); if (myref.IsBroken == true) { wbk.VBProject.References.Remove(myref); } } The problem is that I get the following exception: "Object library not registered". But the reference is still there and I cannot add fresh reference to the project "Name conflicts with existing module, project, or object library". Do you have any suggestion how I get out of this mess and remove the missing reference successfully? Thank you for your time, Nacho |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to programmatically remove an AddIn (xla) | Excel Programming | |||
Programmatically remove sharing? | Excel Programming | |||
Programmatically Add Reference` | Excel Programming | |||
Programmatically Add Reference` | Excel Programming | |||
Can i set a reference programmatically? | Excel Programming |