Solved

About variables

Posted on 1998-11-01
1
130 Views
Last Modified: 2012-05-04
I have created two forms in a project named form1 and form2.
In the declaration part of form1, I write Public m_name As String. Then the n_name will be assigned a value in the procedure in form1.  Then when I refer this variable in form2, I find that I can't retrieve the value of that variable. It seem that VB treat this variable as a new variable. How can I do?
0
Comment
Question by:q1w2
1 Comment
 
LVL 2

Accepted Solution

by:
schild earned 50 total points
ID: 1442750
You have to declare it as Public inside a Module.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now