We help IT Professionals succeed at work.
Get Started

Is a public sub called from a private module able to provide any information to the private modu

upobDaPlaya
upobDaPlaya asked
on
356 Views
Last Modified: 2014-08-24
If a private sub from within a Form calls a Public sub are any of the variables in the Public sub available in the private sub ?

For example if I call Public Sub Volunteers and the Public Sub has a variable called strVolunteerName Name will strVolunteerName be available in the Private Sub if strVolunteerName has also been declared in the Private Sub ?  

If no how can strVolunteerName be made available to the private sub.

The goal is from the Form sub to call the public sub several times so I can retrieve Volunteer information.  Currently I have a record-set retrieval for volunteer information being done from within in the private sub, but the same recordset retrieval is repeated within the private sub several times so I believe this is a good instance where the retrieval should be placed in its own sub, but I always get confused on the public/private declaration.
Comment
Watch Question
Owner, Dev-Soln LLC
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2010
Commented:
This problem has been solved!
Unlock 3 Answers and 5 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE