Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group Variables 1

Status
Not open for further replies.

mcauliff

Programmer
Feb 26, 2007
71
US
This is a newbie question. Is this possible?

I want to group variables into something I'm able to pass to Sub modules. One module will load the variables the others will read and process based on the variables.

I built a Structure. but after the load module ended the contents of the structure is empty. The Structure is declared before the Main

An example

group PERSON
Dim FirstName AS String
Dim MiddleName As String
Dim LastName As String
Dim Address As String
Dim Telephone As interger

Dim individual AS Person


GetPerson(ByVal somebody As Person)


 
When you pass a structure ByVal, you're passing a copy of the structure; any changes you make in the subroutine are working on that copy. Try changing ByVal to ByRef in your subroutine call.
 
DaveInIowa

Thank you, that corrected the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top