Consulting

Results 1 to 3 of 3

Thread: MsgBox with Icon on error

  1. #1
    VBAX Mentor
    Joined
    Aug 2020
    Location
    Hampshire
    Posts
    395
    Location

    MsgBox with Icon on error

    Trying to get the Critical icon to show in the message box if a text is not input.

    If TextBox2.Index = 0 Then
            OutPut = MsgBox("Provide reason", vbCritical, "Audit Department")
            TextBox2.SetFocus
            Exit Sub
        End If
    I don't think I'm too far away, but not quite there.

    Thanks!

  2. #2
    If TextBox2.Text = "" Then
       MsgBox "Provide reason", vbCritical, "Audit Department"
       TextBox2.SetFocus
       Exit Sub
    End if
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes
    http://www.gmayor.com

  3. #3
    VBAX Mentor
    Joined
    Aug 2020
    Location
    Hampshire
    Posts
    395
    Location
    Thank you, this works nicely.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •