[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Difference in “scope” of two Public variables

Posted on 2006-11-03
1
Medium Priority
?
175 Views
Last Modified: 2010-04-30
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
Comment
Question by:lee88
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 17864820
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question