Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rustyfishbones
Master II
Master II

Create an Input Box (VBA) for Variables

Hi All,

I have 10 variables, where I want the user to change the value in these variables based on certain criteria.

I could just have something like this where the user could just change it.But I find it awkward to add the qty

2014-02-28_1600.png

I would like to have an input box something like the image below, and that would populate the variable

2014-02-28_1606.png

1 Solution

Accepted Solutions
rustyfishbones
Master II
Master II
Author

I don't like it, it can be quite cumbersome

Anyway, I think I have a solution I got from the API guide

here it is, I have a variable called input.picking.ops

And I added this to the Edit Module

SUB inputpickingops

oldtext = ActiveDocument.Evaluate("input.picking.ops")

t = ActiveDocument.GetApplication.InputBoxEx("Enter New Variable Value for input.picking.ops :",oldtext)

ActiveDocument.Variables("input.picking.ops").SetContent t,true

END SUB

With this result

2014-02-28_1625.png

View solution in original post

3 Replies
Anonymous
Not applicable

Alan,

I'm probably missing something - but why don't you use the regular QV input box object?

Regards,

Michael

chiru_thota
Specialist
Specialist

Hi,

you can use QV inputbox object as Michael mentioned.

You can define variables and link them to input boxes

Variable.jpg

rustyfishbones
Master II
Master II
Author

I don't like it, it can be quite cumbersome

Anyway, I think I have a solution I got from the API guide

here it is, I have a variable called input.picking.ops

And I added this to the Edit Module

SUB inputpickingops

oldtext = ActiveDocument.Evaluate("input.picking.ops")

t = ActiveDocument.GetApplication.InputBoxEx("Enter New Variable Value for input.picking.ops :",oldtext)

ActiveDocument.Variables("input.picking.ops").SetContent t,true

END SUB

With this result

2014-02-28_1625.png