Dirk,
That's odd... I've always used String for vbYes or vbNo, and Integer for =6 or =7.
I tend to agree, but... here's the example from Help for MsgBox...
(I removed some extraneous "Help" code)
Dim Msg, Style, Title, Response, MyString
Msg = "Do you want to continue ?"
Style = vbYesNo + vbCritical + vbDefaultButton2
Title = "MsgBox Demonstration"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
MyString = "Yes" ' Perform some action.
Else
MyString = "No" ' Perform some action.
End If
Also, I tried these two examples, using String and Integer in each instance... and they
all work...
Dim Response As String '(or Integer)
Response = MsgBox("Yes or No", vbYesNo)
If Response = vbYes Then
Beep
End If
Dim Response As String '(or Integer)
Response = MsgBox("Yes or No", vbYesNo)
If Response = 6 Then
Beep
End If
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions
"Find a job that you love, and you'll never work a day in your life."