M
max
Hi
I'm reading "Excel 2000 power programming with vba" by Walkenbach, in
the 27th chapter he mentions that by adding a reference to Microsoft
Visual Basic for Applications Extensibility in a VBA Project a
programmer can have access to all the VB Editor's objects, properties
and methods.
Now I added a reference (tools,References in VBE) to the Microsoft
Visual basic for Applications Extensibility 5.3 for a new workbook and
then wrote this code :
Sub ListReferences()
Dim ref As Reference, msg As String
msg = ""
For Each ref In ActiveWorkbook.VBProject.References
msg = msg & ref.Name & vbCrLf
Next ref
MsgBox msg
End Sub
but when I try it I get an error (run time error 1004) as it can't
resolve ActiveWorkbook.VBProject.
Is the Microsoft Visual basic for Applications Extensibility 5.3 the
right reference to add?
I'm on Excel 2002.
Regards.
Massimo.
Bye
I'm reading "Excel 2000 power programming with vba" by Walkenbach, in
the 27th chapter he mentions that by adding a reference to Microsoft
Visual Basic for Applications Extensibility in a VBA Project a
programmer can have access to all the VB Editor's objects, properties
and methods.
Now I added a reference (tools,References in VBE) to the Microsoft
Visual basic for Applications Extensibility 5.3 for a new workbook and
then wrote this code :
Sub ListReferences()
Dim ref As Reference, msg As String
msg = ""
For Each ref In ActiveWorkbook.VBProject.References
msg = msg & ref.Name & vbCrLf
Next ref
MsgBox msg
End Sub
but when I try it I get an error (run time error 1004) as it can't
resolve ActiveWorkbook.VBProject.
Is the Microsoft Visual basic for Applications Extensibility 5.3 the
right reference to add?
I'm on Excel 2002.
Regards.
Massimo.
Bye