[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 177
  • Last Modified:

Difference in “scope” of two Public variables

What is the difference in the “scope” of these two Public variables (that are in the same VB6 project):
1. variable, sPubInFrm, declared as Public in one of the project’s forms, and
2. variable, sPubInMod, declared as Public in one of the project’s modules?

Does it make any difference if the form is the "Startup object" for the project?
0
lee88
Asked:
lee88
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
a public variable in a form will be available as member of the form object, managed as per instance of the form
a public variable in a module will be available everywhere in the project, single instance within the whole project

>Does it make any difference if the form is the "Startup object" for the project?
no
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now