Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi there...

how to set text in textbox automatically?

for example:

if textbox1.text = "shutdown" then
textbox2.text = "ok shutting down"
end if

but even though shutdown is indicated in tectbox1.text, textbox2.text does'nt indicate the phrase "ok shutting down"

here is my code:

VB
Private Sub shutdown()

       If receiveRT.Text = "Shutdown" Or "shutdown" Then
           SendRT.Text = "Shutting Down" 
end if

           If SendRT.Text = "Shutting Down" Then
               With srPort
                   .Write("AT")
                   .Write("AT+CMGF=1" & vbCrLf)
                   .Write("AT+CMGS=" & Chr(34) & CNtbox.Text & Chr(34) & vbCrLf)
                   .Write(SendRT.Text & Chr(26))
                   MsgBox("Message sent")

               End With
           End If

       End If
   End Sub
Posted
Updated 1-May-13 21:17pm
v3
Comments
Hemant Singh Rautela 2-May-13 3:44am    
& what is the problem..???
as you told "how to set text in textbox automatically?"
you done by --- textbox2.text = "ok shutting down"---

Then..??
On which event you call shutdown()
Member 10021148 2-May-13 4:10am    
sir hematrautela, the problem is SendRT.text does'nt show the word shutting down

1 solution

By setting it!
In your sample, you do not set the text property, you just test it for a specific value:
VB
If receiveRT.Text = "Shutdown" Or "shutdown" Then
    If SendRT.Text = "Shutting Down" Then
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900