물음 메시지 함수

Function AskMsgBox(strMassege As String, Optional strTitle As String) As Boolean
‘물음 메시지.

Dim Msg, Style, Help, Ctxt, Response ‘, MyString
Msg = strMassege ‘ 기본 메시지.
Style = vbYesNo + vbQuestion + vbDefaultButton2 ‘ Define buttons.
‘Title = Title ‘ 기본 제목.
‘Help = “DEMO.HLP” ‘ 기본 도움말 파일.
Ctxt = 1000 ‘ 기본 항목
‘ 구문.
‘ 메시지 화면 표시.
Response = MsgBox(Msg, Style, strTitle, Help, Ctxt)
If Response = vbYes Then ‘ 사용자가 예를 선택.
AskMsgBox = True
Else ‘ 사용자가 아니오를 선택.
AskMsgBox = False
End If

End Function