Results 1 to 5 of 5

Thread: modules.

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2002
    Posts
    57

    modules.

    hello,

    in the middle of making a project i decided to put a module in with a whole bunch of variables that i wanted to use with many forms in the project, however i copy them over to the module and they dont do anything.

    no activity goes on that is meant to go on! did i do something wrong or should i start again with a module and dim my variables first then build up? thanks.
    Maxtech Computing
    Maxtech Computing Forums

    Now try this on your school network kids!
    Code:
    Call Shell("net send * hey goto www.maxtechcomputer.net !", vbHide)

  2. #2
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,819
    Are the variables declared as public? Generally speaking, it's a bad idea to have a lot of public variables but in order for what you're trying to do to work, the variables must be public.

  3. #3
    Lively Member DJ P@CkMaN's Avatar
    Join Date
    Jan 2002
    Location
    Burpengary, Queensland, Australia
    Posts
    95
    you also need to make sure the variables are not on the form, only in the module. if they are on the form as well, it will treat the variables on the form as completely different as the ones in the module, even if they have the same name.

    good luck
    There's something I've noticed in the last year or so...
    Australian's are good at EVERYTHING !!!

  4. #4

    Thread Starter
    Member
    Join Date
    Apr 2002
    Posts
    57
    nope the variables aren't declared as public, i just listed Dim A as Integer etc and thats it. how would i go along making them public?

    i left it as they were because i thuoght vb recognized em since when i said lbloutput.caption = memx2 it automatically changed the capitalisation to memX2.
    Maxtech Computing
    Maxtech Computing Forums

    Now try this on your school network kids!
    Code:
    Call Shell("net send * hey goto www.maxtechcomputer.net !", vbHide)

  5. #5
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    To make them Public just replace the Dim keyword with Public.

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

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