Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
5abi0001
Creator
Creator

Create a textobject with macro and give it a macro

Hey! I create via a macro textboxes. Now what i want is, that to give these created textboxes in the macro actions like use macro, set variables .. is it possible?

1 Reply
tamilarasu
Champion
Champion

Macro Action:

Sub Test

set MyText = ActiveDocument.ActiveSheet.CreateTextObject

set prop = MyText.GetProperties

set TextActions = prop.Layout.ActionItems

TextActions.Add

TextActions.Item(0).Type=13

set ActionParam=TextActions.Item(0).Parameters

ActionParam.Add

ActionParam.Item(0).v="Test"

MyText.SetProperties prop

End Sub

Variable Action:


Sub Test


set MyText = ActiveDocument.ActiveSheet.CreateTextObject

set prop = MyText.GetProperties

set TextActions = prop.Layout.ActionItems

TextActions.Add

TextActions.Item(0).Type=31

set ActionParam=TextActions.Item(0).Parameters

ActionParam.Add

ActionParam.Item(0).v="Test"

ActionParam.Add

ActionParam.Item(1).v="0"

MyText.SetProperties prop

End Sub