Sub SetPMText(extends pm as PopupMenu, assigns s as String)
for i as integer = 0 to pm.ListCount-1
if pm.list(i) = s then
pm.ListIndex = i
exit
end
next
End Sub
Call it by MyPopup.SetPMText = “DesiredValue”
I think this originated from Bob Keeney’s Utility module.