Click to See Complete Forum and Search --> : how to get contents of text box into Message box


Basavaraj D.M
March 23rd, 1999, 06:28 AM
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

Chris Eastwood
March 23rd, 1999, 07:08 AM
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

Aniruddha Sengupta
March 24th, 1999, 02:36 PM
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.