Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Further to my previous post on the 10th, i have a few
questions/results to post, i find it impossible to remove any reference without an error coming up. I used the following code: On Error Resume Next Application.DisplayAlerts = False With ThisWorkbook.VBProject.References .Remove .Item("ProgressIndicator") Debug.Print Err.Number End With Application.DisplayAlerts = True On Error GoTo 0 Application.DisplayAlerts = False ThisWorkbook.VBProject.References.AddFromFile ("c:\ProgressIndicator.dll") Application.DisplayAlerts = True So, in the first instance i delete the reference and then i add it up again. Please note that in the current procedure i do not use the dll, the dll is used from another procedure. So, there are two cases one in which the dll is already referenced and one in which it is not. Suppose that it is referenced, then the code in deleteing the reference comes up with "Can't enter break mode at this time" and the options "continue" or "end only" are possible. So i used debug.print err.number to get the error number, which is zero! If its not referenced then it goes smoothly through the "deletion" routine (as there is nothing to delete) and again comes up with "Can't enter break mode at this time" "continue" or "end" options. Now, here the strangest thing happens, i click on end and i have a look at the references, and the code has added a reference to "ProgressIndicator.dll" but not on "C:\" but rather on "C:\windows\System32\". I really don't get and of course the "ProgressIndicator.dll" does not reside on system32... I am a bit perplexed, sorry for the big post, Thanks a lot for your replies, rgrds, Alex |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I remove a reference from a cell? | Excel Discussion (Misc queries) | |||
How to remove path from macro reference | Excel Discussion (Misc queries) | |||
remove rows with the same reference | Excel Programming | |||
remove reference via code | Excel Programming | |||
Remove a reference | Excel Programming |