Hard Code DLL Reference in VBA
Re Alex,
With ThisWorkbook.VBProject.References
.Remove .Item("ProgressIndicator")
End With
MP
"alex" a écrit dans le message de
...
thanks a million for that it works just fine!
one more question once i add it then at the end of the
procedures i also want to delete it
i tried to use the following:
i=0
For Each v In ThisWorkbook.VBProject.References
If v.Name = "ProgressIndicator" Then 'Which occurs OK
ThisWorkbook.VBProject.References.Remove v "or"
v.remove
End If
Next
in both of the above cases it doesn't delete the reference
and it comes up with errors.
Now the basic problem is that you can not DIM something as
a Reference (hence i DIM'd v as Variant) and since the
.Remove property needs a reference in order to delete it
that creates a problem.
any ideas?
once more i appreciate your advice!
Alex
|