Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Aug 2001
    Posts
    158
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Declaring Variables (Word 97/XP)

    I have variables that are being used in both Modules and Forms. I found that declaring the variables in the Modules section, Forms section is not recognizing them, and vice versa. Right now, I declared them in both Modules and Forms. Where should I declare these variables so I can use them in both Modules and Forms without declaring them twice?

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Declaring Variables (Word 97/XP)

    If you want to pass data back and forth, declare the variables at the top of your regular module with the keyword Public. This will ensure that you can modify the same variable (not another, local variable with the same name, which wouldn't be very useful) wherever you refer to it.

  3. #3
    2 Star Lounger
    Join Date
    Aug 2001
    Posts
    158
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Declaring Variables (Word 97/XP)

    Great!

    Thanks again!

Posting Permissions

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