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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
m_woolf
Master II
Master II

Macro code to set textbox caption

Can someone supply a code snippet that will set the caption to a textbox?

Thanks in acvance for your help.

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

    This is the macro to set the caption for textbox.

 

set mybox = ActiveDocument.GetSheetObject("TX29")   /// here TX29 is object ID for the textbox.

set mbp = mybox.GetProperties

mbp.Layout.Frame.Name.v = "abc"

mybox.SetProperties mbp

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

    This is the macro to set the caption for textbox.

 

set mybox = ActiveDocument.GetSheetObject("TX29")   /// here TX29 is object ID for the textbox.

set mbp = mybox.GetProperties

mbp.Layout.Frame.Name.v = "abc"

mybox.SetProperties mbp

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable

I'd like to set the caption of a chart like this, but unfortunately the code above doesn't work. It does work for a text box but if I put in the object ID for a chart with the same code it fails. Do you know why?