Results 1 to 7 of 7

Thread: [RESOLVED] Message box

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2009
    Posts
    1,058

    Resolved [RESOLVED] Message box

    Hi,

    I have the following message box prompt..
    Code:
    MsgBox("New Payment Run has been added with Payment reference: txtPayRef.text", MsgBoxStyle.Information, "VeriSIS")
    I want it to read the value in txtPayRef which is the reference of the payment. I tried inserting txtPayRef.text but it is not correct as it shows txtPayRef.Text.

    Any ideas please..

    Thanks

  2. #2
    Junior Member
    Join Date
    Aug 2010
    Posts
    23

    Re: Message box

    I'd try moving the quotation to the place where the text ends and the variable starts...i.e. after the colon .

  3. #3
    Addicted Member
    Join Date
    Nov 2008
    Location
    UK
    Posts
    171

    Re: Message box

    This is the code:

    Code:
    MsgBox("New Payment Run has been added with Payment reference: " & txtPayRef.text, MsgBoxStyle.Information, "VeriSIS")

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Message box

    <Pet Peeve>If you are going to be coding in VB.NET then use VB.NET, NOT legacy VB6 code. The correct syntax is:
    vb.net Code:
    1. MessageBox.Show("New Payment Run has been added with Payment reference: " & txtPayRef.Text, _
    2. "VeriSys", MessageBoxButtons.OK, MessageBoxIcon.Information)
    </Pet Peeve>

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2009
    Posts
    1,058

    Re: Message box

    Thank you all

  6. #6
    Lively Member
    Join Date
    Apr 2007
    Posts
    86

    Re: Message box

    lol @Hack

  7. #7
    Junior Member
    Join Date
    Aug 2010
    Posts
    23

    Re: Message box

    Quote Originally Posted by mjenkinson05 View Post
    lol @Hack
    Ha ha, yeah, good point though.
    AKA GettinBetter - I couldn't remember my user name for my home loggin, and needed the email to go to my works address. Hence now have two usernames.

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