active document as sub parameter

active document as sub parameter

^_^clovis^_^
Advocate Advocate
298 Views
1 Reply
Message 1 of 2

active document as sub parameter

^_^clovis^_^
Advocate
Advocate

Hello,

(I'm a newbie with VBA Inventor.)

I'd like to write a private sub in a module that would be called from the main Sub.

I'd like to have the active document as a parameter for this private sub but I can't find the solution to make it works.

Thanks for any help

 

 

Dim oInvDoc As Document
Set oInvDoc = ThisApplication.ActiveDocument

If oInvDoc.DocumentType = kAssemblyDocumentObject Then
  updateTag(oInvDoc)
endif

Private Sub updateTag(oDoc As Document)

Dim oDocu As Document
Set oDocu = oDoc
..
End Sub

 

0 Likes
299 Views
1 Reply
Reply (1)
Message 2 of 2

Rene_Gerlach
Advocate
Advocate
Try this:
If oInvDoc.DocumentType = kAssemblyDocumentObject Then
  call updateTag(oInvDoc)
endif
0 Likes