Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello! How can I automatic select a record from a field in my list box... I tried setting the sheet properties , then triggers and on select but it doesn't allow me to unselect and select a different record.
For Example :
Phones (field):
Apple
HTC
Samsung
In my example above, I just want to automatic select "Apple" the first thing I open the file but it will allow me to unselect and select another phones like SAMSUNG. Is this possible?
create the OnOpen trigger as specified above but make sure 'Always one selected value' is *not* ticked
Select 'Apple' ,go to listbox properties & tick 'Always one selected value'.
Save and close the document.
Use 'OnOpen' event like attached sample.
Hi,
Try to setup a trigger in document property>Triggers>Document Event Triggers>OnOpen>Select in field
Specify your field name and search string.
HTH
Sushil
Thanks you, guys for the helpful advise.. all suggestions allows me to select and unselect but it does not allow me to clear all my selections.
create the OnOpen trigger as specified above but make sure 'Always one selected value' is *not* ticked
Create the open trigger and add an external action and choose run macro = SelectRandom
Sub SelectRandom
val = ActiveDocument.Evaluate("FieldValue('Phones', ceil(" & Rnd() _
& " * FieldValueCount('Phones')))")
ActiveDocument.Fields("Phones").Select val
End Sub
This means when the document opens each time it will randomly select a value from the field Phones
Kai,
I got it...This is what I exactly wanted.
Tks.