Input Box-Little issue

Hi All I am having a very small issue in Inputbox,I am accepting Employee Code using inputbox,it’s working fine,now i need if some one clicks on cancel it should come out of the form,i tried n no of logic but all in vain.

peace of code

ecode1=Inputbox(“enter the emp code”)

Subject: Input Box-Little issue

if ecode1 = “” then

Subject: Input Box-Little issue

Using the notesUIWorkspace.Prompt method gives you more options.Using the PROMPT_OKCANCELEDIT option you get a behaviour very similar to the Inputbox.

To know if Cancel was clicked, you’d use something like this:

Dim ws As New NotesUIWorkspace

Dim vResponse As Variant

Dim strEmployeeCode As String

vResponse = ws.Prompt(PROMPT_OKCANCELEDIT, “Employee Code”, “Enter Employee Code”)

If IsEmpty(vResponse) Then

'-- Cancel clicked.

'-- Do something

End If

If IsArray(vResponse) Then

strEmployeeCode = vResponse(0)

Else

strEmployeeCode = vResponse

End If

'-- Do something with the Employee Code.

Hope this helps

ken@noteshound.com