|
-
Jul 5th, 2000, 05:27 PM
#1
Thread Starter
Hyperactive Member
I'm pretty sure my code below doesn't need to be repeated. I'd appreciate if someone could show me how to tidy it up a bit - it works fine, but I know it could be neater.
Thanks for any help!
'Two command buttons and a textbox. The command buttons are 'for back and forward, through the text.
Dim MyText(0 To 5), CurText
Private Sub Command1_Click()
MyText(0) = "Yadayada"
MyText(1) = "Chicaboom"
MyText(2) = "Spaceman!"
MyText(3) = "Everybody"
MyText(4) = "Mr Bombastic"
MyText(5) = "Get Up, Get Up!!"
If CurText <> 0 Then
Form1.Text1.Text = MyText(CurText - 1)
CurText = CurText - 1
End If
End Sub
Private Sub Command2_Click()
MyText(0) = "Yadayada"
MyText(1) = "Chicaboom"
MyText(2) = "Spaceman!"
MyText(3) = "Everybody"
MyText(4) = "Mr Bombastic"
MyText(5) = "Get Up, Get Up!!"
If CurText <> 5 Then
Form1.Text1.Text = MyText(CurText + 1)
CurText = CurText + 1
End If
If CurText = 5 Then
Form1.Text1.Text = MyText(CurText)
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|