problem with VB programming

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jjanfish
    New Member
    • Apr 2008
    • 4

    problem with VB programming

    Hi
    I write interactive worksheets for my students using VB programming. If they enter a string of text accurately, then the string turns green - excellent. I don't write from scratch, just copy and paste from an existing document and change the wording of the string. The problem I have is that the first box will work correctly, but most of the subsequent ones, will not recognise the first keystroke, so if they enter 'John likes to eat cake.' it appears as 'ohn likes to eat cake.'
    I include a sample of the code that I use.

    Private Sub TextBox2_Change ()
    If TextBox2.Text = "I like to play computer games." Then TextBox2.ForeCo lor = &H8000& Else TextBox2.ForeCo lor = vbBlack
    End Sub

    Strangely, sometimes this does not happen, but I can see no reason why.

    Jan
  • epots9
    Recognized Expert Top Contributor
    • May 2007
    • 1352

    #2
    Moved to the VB Forums where the resident experts can better assist you.

    **Moved form Programming Challenges.

    Comment

    Working...