Message 1 of 6
64 bit reports wrong MemberType

Not applicable
05-13-2009
02:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
If I run the code below on a 64 bit machine with Public Subs in Default.ivb,
the msgbox never displays and all Subs are actually returned as being
Functions. If I run it on my 32 bit machine then it reports the subs as
subs.
Is this known, or am I doing something wrong, and if not is there a
workaround?
Inventor 2009
Public Sub FindMacros()
Dim oVBA As InventorVBAProjects
Dim oVBProject As InventorVBAProject
Dim oVBComponent As InventorVBAComponent
Dim oVBAMember As InventorVBAMember
Dim m_IVApp As Inventor.Application
Set m_IVApp = ThisApplication
Set oVBA = m_IVApp.VBAProjects
For Each oVBProject In oVBA
For Each oVBComponent In oVBProject.InventorVBAComponents
For Each oVBAMember In oVBComponent.InventorVBAMembers
If oVBAMember.MemberType = MemberTypeEnum.kSubMember
Then
MsgBox oVBAMember.Name
End If
Next
Next
Next
End Sub
--
KWiKMcad
Kent Keller
the msgbox never displays and all Subs are actually returned as being
Functions. If I run it on my 32 bit machine then it reports the subs as
subs.
Is this known, or am I doing something wrong, and if not is there a
workaround?
Inventor 2009
Public Sub FindMacros()
Dim oVBA As InventorVBAProjects
Dim oVBProject As InventorVBAProject
Dim oVBComponent As InventorVBAComponent
Dim oVBAMember As InventorVBAMember
Dim m_IVApp As Inventor.Application
Set m_IVApp = ThisApplication
Set oVBA = m_IVApp.VBAProjects
For Each oVBProject In oVBA
For Each oVBComponent In oVBProject.InventorVBAComponents
For Each oVBAMember In oVBComponent.InventorVBAMembers
If oVBAMember.MemberType = MemberTypeEnum.kSubMember
Then
MsgBox oVBAMember.Name
End If
Next
Next
Next
End Sub
--
KWiKMcad
Kent Keller