Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Setting lable for multibox field using macro

Hi

i have problem with changing lable for one of multibox fields. I need macro for this job. I know it is only several lines but I new at this.

set multibox = ActiveDocument.getSheetObject("MB43")

multibox.AddField "cat2_name_EN"

......(added field lable)....

1 Solution

Accepted Solutions
Not applicable
Author

I found my answer :Big Smile



set multibox = ActiveDocument.getSheetObject("MB42")

multibox.AddField "cat1_name_EN"

mbp = multibox.GetProperties

mbp.MemberAttributes.Item(0).Label.v = "Class description"

multibox.SetProperties mbp



Thank you for help and time 🙂











View solution in original post

4 Replies
johnw
Champion III
Champion III

Do you NEED to use a macro? If I'm understanding what you're asking, you might be able to accomplish the same thing by just using an expression for the field's label. That would be cleaner if it would work for you.

Not applicable
Author

Yes I know. But I need macro because I am adding and removing fields from my multibox using macro and my field's label disappears.

Not applicable
Author

I found my answer :Big Smile



set multibox = ActiveDocument.getSheetObject("MB42")

multibox.AddField "cat1_name_EN"

mbp = multibox.GetProperties

mbp.MemberAttributes.Item(0).Label.v = "Class description"

multibox.SetProperties mbp



Thank you for help and time 🙂











johnw
Champion III
Champion III

Ah, OK. Now I see why you needed it to be in a macro. Glad you were able to figure it out. 🙂