Re: Sharing variables across forms in same project?
- From: "Ed" <ed_millis@xxxxxxxxxxxxxxxxx>
- Date: Mon, 10 Jul 2006 16:08:25 -0700
Thanks, Ken. I appreciate the boost.
Ed
"Ken Halter" <Ken_Halter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:eEjU4%23GpGHA.4196@xxxxxxxxxxxxxxxxxxxxxxx
"Ed" <ed_millis@xxxxxxxxxxxxxxxxx> wrote in message
news:eEUoh7GpGHA.3936@xxxxxxxxxxxxxxxxxxxxxxx
Just to make sure I have this right - if I have a variable declared as
Public in the code of one form, the other form can read and write it,
too, yes? I will be dealing with strings, long counters, Boolean, and
arrays.
Ed
Public variables declared in a form become public properties of that form.
That means, from outside of the form, you'll need to prefix the variable
name with the form's instance name.
Form1:
Public Test As String
Form2:
Form1.Test = "ABC"
MsgBpx Form1.Test
--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
In Loving Memory - http://www.vbsight.com/Remembrance.htm
.
- Follow-Ups:
- References:
- Sharing variables across forms in same project?
- From: Ed
- Re: Sharing variables across forms in same project?
- From: Ken Halter
- Sharing variables across forms in same project?
- Prev by Date: Re: People who have problems with NTSVC.OCX
- Next by Date: Re: Automating sending e-mail
- Previous by thread: Re: Sharing variables across forms in same project?
- Next by thread: Re: Sharing variables across forms in same project?
- Index(es):
Relevant Pages
|