Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have created an Input box using these two variables: Sales (Min) and Sales (Max). It is working fine as expected. But when we clear out
the selections or Variable values, in the Input Box, still the previously entered values is shown( though it is not actually selected). How can I reset
back to say “Enter Values”. Below is the macro I am using. Thanks for your suggestions and time.
Sub input_box
A= Activedocument.variables("Sales (Min)").GetContent.string
B= Activedocument.variables("Sales (Max)").GetContent.string
Activedocument.Fields("Total_Sales").Select">" &A & "<"&B
End Sub
I mean when someone clears the selections, the Input box should also set to Default Values like "Enter Sales" etc. Now, even after clearing, it retains its previously entered value.
check the sample it might helps you
Hi Sivaraj. Thanks for looking into this. I actually want to clear the variables which are used the input boxes. So as soon as someone clears the overall selections, these variables should also re-set to default vales say "Enter vales" etc.I do not want to provide extra button for clearing these variables.
try using this
Sub input_box
A= Activedocument.variables("Sales (Min)").GetContent.string
B= Activedocument.variables("Sales (Max)").GetContent.string
Activedocument.Fields("Total_Sales").Select">" &A & "<"&B
A.Clear
B.Clear
End Sub
am not sure this will work but to avoid button you need to add something in macro
This code will clear variables values everytime but I want it to be cleared only when Clear all is pressed.