Ok, don’t bash me for this. I’m seeing a lot of confuson on this. I just need to get this straight. I’m having a problem when I hit cancel on a LS Prompt Method. The return value is a variant containing a string array if you press OK; and Empty if you press Cancel." Suggestion: Use Dialogbox to tell if user hits cancel???
In my script, I need to be able to tell if user hits cancel when they are string, not variable. Reason is that I have two prompts that I need to use the value as a string. I mean, I don’t have to put in the cancel part but would be nice. Doing below with a Dialogbox seems confusing to me. Suggestions?
taken from help…
Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim askme As Variant
Dim names(3) As Variant
names(0) = "Bill Chu"
names(1) = "Michael Bowling"
names(2) = "Mary Tsen"
names(3) = "Marian Woodward"
askme = ws.Prompt(PROMPT_OKCANCELLISTMULT, _
"Select a Name", _
"Select one or more names as recipients for this request.", _
names(2), names)
If Isempty(askme) Then
Messagebox "User canceled", , "No one selected"
Else
Forall ask In askme
asklist = asklist & ask & Chr(10)
End Forall
Messagebox asklist, , "Recipients"
End If
End Sub