Visual Basic trouble
Im new to VB so if anyone can help me I would be very grateful
You now the text box command well is there a way to display letters instead of numbers cause I cant seem to do it here is my programming
Private Sub code_Click()
End Sub
Private Sub Form_Load()
End Sub
Private Sub Image1_Click()
Completed = Val(hpdisplay.Text) '' Get letter
Hp = Completed
Picture1.Print Hp;
End Sub
val()''s job is to turn a character into a number. If you just want the letters, don''t use val(). Just use hpdisplay.Text directly.
If you want only the first letter, use left$(hpdisplay.Text,1)
If you want to loop through the letters, use mid$(hpdisplay.Text,currentpos,1), where currentpos represents the current loop index value.
If you want only the first letter, use left$(hpdisplay.Text,1)
If you want to loop through the letters, use mid$(hpdisplay.Text,currentpos,1), where currentpos represents the current loop index value.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement