ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   "Type" Property for a Reference Object in a VB Project (https://www.excelbanter.com/excel-programming/427286-type-property-reference-object-vbulletin-project.html)

Excel Monkey[_2_]

"Type" Property for a Reference Object in a VB Project
 
Can someone tell what the .Type Property means for a Reference object in a VB
Project? See example below. I get a Type of 0 for all my references.

Sub VBERefList()
Dim chkRef As Reference
Dim vbProj As VBProject

Set vbProj = ThisWorkbook.VBProject

For Each chkRef In vbProj.References
Debug.Print chkRef.Type
Next
End Sub

Thanks

EM

Peter T

"Type" Property for a Reference Object in a VB Project
 
0: vbext_rk_TypeLib
1: vbext_rk_Project


A ref to an app with a type library or to another VBProject

Regards,
Peter T

"Excel Monkey" wrote in message
...
Can someone tell what the .Type Property means for a Reference object in a
VB
Project? See example below. I get a Type of 0 for all my references.

Sub VBERefList()
Dim chkRef As Reference
Dim vbProj As VBProject

Set vbProj = ThisWorkbook.VBProject

For Each chkRef In vbProj.References
Debug.Print chkRef.Type
Next
End Sub

Thanks

EM




Excel Monkey[_2_]

"Type" Property for a Reference Object in a VB Project
 
So its Typelib for DLLs? What is Project for?

Thanks

EM

"Peter T" wrote:

0: vbext_rk_TypeLib
1: vbext_rk_Project


A ref to an app with a type library or to another VBProject

Regards,
Peter T

"Excel Monkey" wrote in message
...
Can someone tell what the .Type Property means for a Reference object in a
VB
Project? See example below. I get a Type of 0 for all my references.

Sub VBERefList()
Dim chkRef As Reference
Dim vbProj As VBProject

Set vbProj = ThisWorkbook.VBProject

For Each chkRef In vbProj.References
Debug.Print chkRef.Type
Next
End Sub

Thanks

EM





Peter T

"Type" Property for a Reference Object in a VB Project
 
So its Typelib for DLLs?

Not only dlls but just about anything other than a VBProject

What is Project for?

As I said, to another VBProject, eg an addin if you want to call its
functions directly.

In passing, if you ever want to do that best to rename the default
"VBAProject" to something unique.

Regards,
Peter T

"Excel Monkey" wrote in message
...
So its Typelib for DLLs? What is Project for?

Thanks

EM

"Peter T" wrote:

0: vbext_rk_TypeLib
1: vbext_rk_Project


A ref to an app with a type library or to another VBProject

Regards,
Peter T

"Excel Monkey" wrote in message
...
Can someone tell what the .Type Property means for a Reference object
in a
VB
Project? See example below. I get a Type of 0 for all my references.

Sub VBERefList()
Dim chkRef As Reference
Dim vbProj As VBProject

Set vbProj = ThisWorkbook.VBProject

For Each chkRef In vbProj.References
Debug.Print chkRef.Type
Next
End Sub

Thanks

EM








All times are GMT +1. The time now is 04:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com