Results 1 to 2 of 2

Thread: Help with variables

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    11

    Question

    How can you share variables between modules in visual basic 6??

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Declare the variable as Public:

    In Module1:
    Code:
    Public myvar As Integer
    In Module2:
    Code:
    Public Sub MySub()
        Debug.Print Module1.myvar
    End Sub
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

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