Archived

This topic is now archived and is closed to further replies.

Visual Basic trouble

This topic is 5305 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites