Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
for a selection I need to condition the related run macro action. I have tried to use the IF statement in the macro name but unsuccessfully.
Is it possible to condition the running of a macro?
Thanks
Hi,
can you upload your QV file....
I don't think you can create a condition to execute a macro. but you can include a condition in the beggining of the macro to execute part of your code or not.
Please, send us some sample app and describe what you need so we can think about something.
(Sometimes we can make it just with the description)
You can make a macro run depending on the value of a variable. Something like:
sub MacroName
set p = ActiveDocument.Variables("vVariable1")
if p.GetContent.String <> "0" then
...
end sub
Trigger the macro on change of a field or on change of the variable value, and it should do what you want.