Results 1 to 5 of 5

Thread: make the variable known[solved]

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2005
    Posts
    61

    Resolved make the variable known[solved]

    if i do something like this how would i make the variable "play" value
    change all over the program?

    VB Code:
    1. Dim play as byte
    2.  
    3.  Private Sub Form_Load()
    4. play = 1
    5. End Sub
    6.  
    7. Private Sub start_Click()
    8. If play = 1 Then
    9. starter
    10. play = 0
    11. End If
    12. End Sub
    13.  
    14. Sub starter()
    15.   Timer1.Interval = 1  ' for 1 millisec
    16.   Timer1.Enabled = True
    17.     stupid.Caption = ""
    18.     play = 1
    19.     countt.Caption = "Count to?"
    20.     End If
    21. Next i
    22. End Sub

    something like that
    in the Sub starter, play is changed to "1"
    but does it only change it in that Sub? or does it change the global variable?
    do i make sense or do i got it all wrong?
    Last edited by rodrigorules; Apr 25th, 2005 at 05:05 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width