Results 1 to 8 of 8

Thread: [RESOLVED] msgbox name

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Posts
    110

    Resolved [RESOLVED] msgbox name

    i noticed today that when you pop up a msgbos using the code

    msgbox "whatever"


    that it always has the default name of excel. is there a bit of code i can add to change what the title of my message box is?

    thanks joe

  2. #2
    Addicted Member
    Join Date
    Jan 2007
    Location
    England
    Posts
    234

    Re: msgbox name

    MsgBox ("hello", vbOKOnly, "Your title here")

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Posts
    110

    Re: msgbox name

    ok so how would i use it with this

    MsgBox TextBox2.Text & " is not a valid first name. Please enter a name longer than 2 characters."

    because this dosnt work

    MsgBox (TextBox1.Text & " is not a valid last name. Please enter a name longer than 2 characters.", vbOKOnly, Invalid last name)

  4. #4
    Lively Member
    Join Date
    Mar 2007
    Posts
    78

    Re: msgbox name

    dim i%
    i=MsgBox (TextBox1.Text & " is not a valid last name. Please enter a name longer than 2 characters.", vbOKOnly, "Your title here")

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Posts
    110

    Re: msgbox name

    i dont want to declare it is a variable, i just want to use it in the way i put before, but it didnt work

  6. #6
    Lively Member
    Join Date
    Mar 2007
    Posts
    78

    Re: msgbox name

    i think this is the procedure to declare msgbox().
    if you do not want to work with the variable, then don't bother about it.
    if the code i posted works then you got what you required.

  7. #7
    Addicted Member
    Join Date
    Jan 2007
    Location
    England
    Posts
    234

    Re: msgbox name

    MsgBox TextBox1.Text & " is not a valid last name. Please enter a name longer than 2 characters.", vbOKOnly, "Invalid last name"

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Posts
    110

    Re: msgbox name

    yep thats great. thankyou

Posting Permissions

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



Click Here to Expand Forum to Full Width