i need too know where too put this code? do put it in excel somewhere? and where too enter the line: Msg = Msg + vbCrLf, can someone tell me how too do this?
Sub Test2()
Dim Answer As String
Answer = MsgBox("Test 2", vbAbortRetryIgnore, "Test")
End Sub
Sub Test3()
Dim Msg, Style, Title, Response, MyString
Msg = "Do you want to continue ?" ' Define message.
Msg = Msg + "This is an extra long line. Will the box get"
Msg = Msg + " bigger or will it wordwrap ??"
Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define buttons.
Title = "MsgBox Demonstration" ' Define title.
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then ' User chose Yes.
MyString = "Yes" ' Perform some action.
Else ' User chose No.
MyString = "No" ' Perform some action.
End If
Response = MsgBox("You pressed " & MyString, vbOKOnly, "Response")
End Sub
Bookmarks