Tom
Brilliant as usual ! Many Thanks.
Steve
"Tom Ogilvy" wrote in message
...
using the () is a syntax violation - it evaluates the object and returns
the
default value which isn't applicable as an argument. so removed the ()
activeworkbook.VBProject.References.Remove str001
so if you have a reference to the VBA extensibility Library
Sub AABB()
Dim str001 As Reference
Set str001 = ActiveWorkbook.VBProject.References(7)
ActiveWorkbook.VBProject.References.Remove str001
End Sub
if not
Sub AABB()
Dim str001 As Object
Set str001 = ActiveWorkbook.VBProject.References(7)
ActiveWorkbook.VBProject.References.Remove str001
End Sub
--
Regards,
Tom Ogilvy
"Steve" wrote in message
...
Sorry that was one of the variants I tried (tried it again though just
in case)
Basically the syntax seems OK but VBA comes back with "object doesn't
support this method"
Anyone any more ideas
Steve
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!