Results 1 to 3 of 3

Thread: [RESOLVED] Passing variable between forms

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2005
    Posts
    248

    Resolved [RESOLVED] Passing variable between forms

    Hi all,

    I'm making a program where I need to pass the contents of a variable from one form to another. I remember when we did this at college it was something to do with byval and byref, and although I've been experimenting with both commands and have read some threads here about it, I can't make it work / keep getting errors.

    Basically, all I need to know is how to pass a simple variable from one form to another, just the commands and the syntax.

    Thanks!

  2. #2
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Re: Passing variable between forms

    You can create a global varibale in a module so that it can be used anywhere within your program.

    VB Code:
    1. 'eg
    2. Public YourVariable As String

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2005
    Posts
    248

    Re: Passing variable between forms

    OH Yeah, Modules.. Forgot about that XD

    Thanks!

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