How to Dim

S

steveski

If I want to create many Long Integer variables (C1, C2, C3, etc.), i
there a shorthand method?

Something shorter than:
Dim c1 as long, c2 as long, c3 as long

Thank
 
D

Dave Hawley

Just as an aside, it's not a good idea to use cell addresses as variable
names.

Posted via: http://www.ozgrid.com
Excel Templates Training Add-ins.
Free Excel Forum & Business Software
 
F

Frank X

steveski > said:
If I want to create many Long Integer variables (C1, C2, C3, etc.), is
there a shorthand method?

Something shorter than:
Dim c1 as long, c2 as long, c3 as long
Why not use an array?
 
J

jaf

Hi Steve,
Try..,
dim c1&, c2&, c3&

& is the shortcut for long.
If you have a real lot, use a spreadsheet to build the strings.

="c" & row() as long 'fill down and or transpose to get more in a row.

Copy & paste into the module.

--
John
johnf 202 at hotmail dot com


| If I want to create many Long Integer variables (C1, C2, C3, etc.), is
| there a shorthand method?
|
| Something shorter than:
| Dim c1 as long, c2 as long, c3 as long
|
| Thanks
|
|
| ---
|
|
 
Top