vbSystemModal won't work

  • Thread starter Thread starter scandar
  • Start date Start date
S

scandar

Guest
Please help. I'm trying to set a msgbox to vbSystemModal. If I understand it correctly, this should 'lock' the entire PC until the user responds. I'm trying this and get the same response as though I used vbModal. It's an Access97 database running on NT.

Thank You,
 
Okay

Here is the syntax I used on my db and it works OK

MsgBox "hello, now respond", vbSystemModal, "hello"

If you are trying to combine request, IE ask for a yes or no then combine like this:

MsgBox "hello, now respond", vbSystemModal + vbYesNoCancel, "hello"

then you can trap response like this

Dim Response as integer

Response = MsgBox("hello, now respond", vbSystemModal + vbYesNoCancel, "hello")

select case response
case vbYes
msgbox "User pressed Yes!"
case vbNo
msgbox "User pressed NO!"
case vbCancel
msgbox "User pressed CANCEL, kick them off the system man!"
end select

And again, combination expressions can be used, IE:

select case MsgBox("hello, now respond", vbSystemModal + vbYesNoCancel, "hello")
case vbYes
msgbox "User pressed Yes!"
case vbNo
msgbox "User pressed NO!"
case vbCancel
msgbox "User pressed CANCEL, kick them off the system man!"
end select

I would only recommend version 3 if you did not have a need to track what the user entered later on in the routine.

Hope this helps.
 

Users who are viewing this thread

Back
Top Bottom