| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: Accessing a variable |
MyArray() is an array, not an object. You can't use it with the New statement. Use MyArray() directly. -- Randy Birch MS MVP Visual Basic http://vbnet.mvps.org/ "John H Dewbert" wrote in message news:7_Ovd.11263$%p1.1028923{at}news20.bellglobal.com... : Hello, : : As you may guess, I'm not a very experienced VB6 programmer... However, I : feel this should be easy to do... but it just doesn't work. : : At the beginning of the "code" in a form (MyForm), I declare a variable: : : '---- MyForm ------- : Dim MyArray() as string : : Later in this form, I put some value in the array. : : : Then, in a separate module (MyModule), I would like to acces the values from : MyArray... : : '--- MyModule ------ : Dim NewArray() as string : NewArray = MyForm.MyArray : : It doesn't work... I get the following error message when I execute the : code: : Compile Error: Method or data member not found. : : Also, if I try to replace the Dim line in MyForm with: Public MyArray() as : string , then I instantly get the message: : Compile error: Constants, fixed-length strings, arrays, user-defined types : and Declare statements not allowed as Public members of object modules. : : What would be the solution? : : Thank you for your help! : : --- þ RIMEGate(tm)/RGXPost V1.14 at BBSWORLD * Info{at}bbsworld.com --- * RIMEGate(tm)V10.2áÿ* RelayNet(tm) NNTP Gateway * MoonDog BBS * RgateImp.MoonDog.BBS at 12/15/04 6:01:31 AM* Origin: MoonDog BBS, Brooklyn,NY, 718 692-2498, 1:278/230 (1:278/230) SEEN-BY: 633/267 270 5030/786 @PATH: 278/230 10/345 106/1 2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.