List Info

Thread: VBA and Structures




VBA and Structures
country flaguser name
United States
2007-10-24 14:46:03

Simple question:
Does VBA have structures, or do you have to use a multidimensional array?

If so, can I get a $2.00 example?

Thank you!
Tim

__._,_.___
.

__,_._,___
Re: VBA and Structures
country flaguser name
United States
2007-10-24 14:56:19

You can use collections in VBA...
 
/tr


 
On 10/24/07, Tim Lewis < twlewissofthome.net">twlewissofthome.net> wrote:

Simple question:
Does VBA have structures, or do you have to use a multidimensional array?

If so, can I get a $2.00 example?

Thank you!
Tim


__._,_.___
.

__,_._,___
RE: VBA and Structures
country flaguser name
United States
2007-10-24 15:17:20

Better yet, you can use classes, and then instantiate them.
The specifics are a little different than VB6, but the basics are the same.

Cheap and easy way.
Go to the VBA editor, and insert a class module. Add some variables with Public scope (warning, this is NOT good OOP, but okay for starters).

If all you are doing is creating, effectively, a structure, you don't need too much coaching, but for more detail, I would look here

http://msdn2.microsoft.com/en-us/library/aa164936(office.10).aspx

among other places.
HTH
-BDN

________________________________

From: helpwithvb%40yahoogroups.com">helpwithvbyahoogroups.com on behalf of Tim Rupp
Sent: Wed 10/24/2007 2:56 PM
To: helpwithvb%40yahoogroups.com">helpwithvbyahoogroups.com
Subject: Re: [helpwithvb] VBA and Structures

You can use collections in VBA...

/tr

On 10/24/07, Tim Lewis < twlewis%40softhome.net">twlewissofthome.net <mailto: twlewis%40softhome.net">twlewissofthome.net> > wrote:

Simple question:
Does VBA have structures, or do you have to use a multidimensional array?

If so, can I get a $2.00 example?

Thank you!
Tim





__._,_.___
.

__,_._,___
  
RE: VBA and Structures
country flaguser name
United States
2007-10-24 15:40:53

That is perfect. Exactly what I need.
Thank you!

> Better yet, you can use classes, and then instantiate them.
&gt; The specifics are a little different than VB6, but the basics are the
> same.
&gt;
> Cheap and easy way.
>; Go to the VBA editor, and insert a class module. Add some variables with
>; Public scope (warning, this is NOT good OOP, but okay for starters).
>
&gt; If all you are doing is creating, effectively, a structure, you don't need
>; too much coaching, but for more detail, I would look here
>;
> http://msdn2.microsoft.com/en-us/library/aa164936(office.10).aspx
>;
> among other places.
> HTH
> -BDN
>;
> ________________________________
>
> From: helpwithvb%40yahoogroups.com">helpwithvbyahoogroups.com on behalf of Tim Rupp
>; Sent: Wed 10/24/2007 2:56 PM
> To: helpwithvb%40yahoogroups.com">helpwithvbyahoogroups.com
&gt; Subject: Re: [helpwithvb] VBA and Structures
>
&gt;
>
> You can use collections in VBA...
&gt;
> /tr
>
>
&gt;
> On 10/24/07, Tim Lewis < twlewis%40softhome.net">twlewissofthome.net <mailto: twlewis%40softhome.net">twlewissofthome.net>
> > wrote:
&gt;
> Simple question:
> Does VBA have structures, or do you have to use a multidimensional array?
&gt;
> If so, can I get a $2.00 example?
>
>; Thank you!
>; Tim
>;
>
>
>
>
&gt;
>
>

__._,_.___
.

__,_._,___
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )