Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
How can be defined that on a sheet activate event the first possible value of a specific field should be initially selected.
I was trying to go through the Sheet Settings - Triggers but didn't succeed.
Appreciate all the help you can give
Regards
Joao
For the Sheet, set the OnActivate event to use a macro like this:
Sub Selector
set fld = ActiveDocument.Fields("FIELD")
set val = fld.GetPossibleValues
fld.Select val.Item(0).Text
End Sub
I'm not sure if you can select the first possible using a trigger. You could probably create a variable that holds the first possible and then select using that. I'm back on 8.5, so I've been unable to use triggers for a while.
For the Sheet, set the OnActivate event to use a macro like this:
Sub Selector
set fld = ActiveDocument.Fields("FIELD")
set val = fld.GetPossibleValues
fld.Select val.Item(0).Text
End Sub
I'm not sure if you can select the first possible using a trigger. You could probably create a variable that holds the first possible and then select using that. I'm back on 8.5, so I've been unable to use triggers for a while.
Hi Miller,
Thank you for you promptly help.
The solution fits perfectly and the issue is solved.
Regards
Joao
Hi Miller!
Hope you can give me some solution for me here.