How to Dim

  • Thread starter Thread starter steveski
  • Start date Start date
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
 
Look up "Deftype Statements" or DefLng.

Regards,
Jim Cone
San Francisco, CA
 
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
 
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?
 
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
|
|
| ---
| Message posted
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top