CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 1999
    Posts
    5

    how to get contents of text box into Message box



    hi,


    there is form desighned with text box for employee name and some controls ..and there is certain condition ,,what i need is the contents of text Box should be displayed in the message box

    for example

    contents of text box = vivek

    on ceratin conditions ......

    contents of Message box should be vivek is not eligible


    what ever name entered into the text box ...msg box should have the same name


    Could someone solve my problem

    regards

    Basavaraj



  2. #2
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: how to get contents of text box into Message box



    Hi


    Say your text box is called 'Text1', you could use


    MsgBox Text1.Text & " is not eligible"


    Or...


    Dim sName As String


    sName = Text1.Text


    MsgBox sName & " is not eligible"



    Regards


    Chris Eastwood

    Codeguru - the website for developers

    http://www.codeguru.com/vb



  3. #3
    Join Date
    Mar 1999
    Posts
    2

    Re: how to get contents of text box into Message box



    If I have understood your problem properly, here's a suggestion.


    if your textbox is valled 'text1', try to open a msgbox as follows:


    call msgbox(text1.text)


    Hope this helps you out.

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

Featured