Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to enter text in TextBox?

Status
Not open for further replies.

spown

Electrical
May 28, 2005
9
Hallo, I'm want to enter a text in text property of TextBox. I read help exampels and using the following part of cod
Sub Eltablo()
Dim Trafopost, Izvod As String
Dim StalbNomer, TabloNomer As String
Dim tipTablo As String
Dim EPN As String
Dim Electromer, Tok As String
Dim Chasovnik, ChasovnikNomer As String
Dim Tarifi, Fasa, TT, NT As String

Trafopost = "TP 1"
Izvod = "A"
StalbNomer = "1"
TabloNomer = "1"
tipTablo = "TEMO 1M"

txtTrafopost.Text = Trafopost
txtIzvod.Text = Izvod
txtTablo.Text = tipTablo
txtStalb.Text = StalbNomer
txtTablo.Text = TabloNomer

End Sub
but it does not work.
Pleas tell me why?
 
Replies continue below

Recommended for you

There is a few points:
Code:
Dim Trafopost, Izvod As String
will Dim Trafopost as a Variant and Izvod as a String.
Code:
 txtTablo.Text = tipTablo
    txtStalb.Text = StalbNomer
    txtTablo.Text = TabloNomer
is overwriting the value in txtTablo from tipTablo to TabloNomer

Is this Word VBA? The code works fine for me - where is the Sub and how are you calling it?

Good Luck
johnwm
________________________________________________________
To get the best from these forums read faq731-376 before posting

UK steam enthusiasts:
 
Thank you for answer. This is AutoCad VBA and I found my mistace. This realy works fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor