It really depends on how you're using the array.
Basically, using:
Dim Arrayabc

You're not declaring an "array", you're declaring a single variable, type 
Variant.
Now, later you can use 
Redim ArrayABC(30)
and change the variable to an array.

Or, curiously enough:

ArrayABC = Split("The big brown dog jumped over the lazy fox"," ")

will Redim ArrayABC to whatever array size is required to store the string.
(in this case, Ubound(ArrayABC) will be 8)

If you were to use:
Dim ArrayABC
Dim ArrayDEF()
Dim ArrayXYZ(3)
.
.
.
Redim ArrayABC(30)
Redim ArrayDEF(30)
Redim ArrayXYZ(30) ' Will not work, because the array was already defined.

So, depending on how you plan to use it, you can either have the () or not.
However, if you choose to use the (), you MUST (in some manner) define the 
array 
size before you can use the array.
However:
You CAN change a single variant to an array, and back again:

    Dim A
    A = "The Big Brown Dog"
    A = Split("The big brown dog jumped over the lazy fox", " ")
    Erase A
    A = "Jumped over the Lazy Fox"

hope this isn't too confusing.

Paul



________________________________
From: hanumant shinde <hanumant_5...@yahoo.co.in>
To: excel macros <excel-macros@googlegroups.com>
Sent: Sat, March 5, 2011 2:31:03 PM
Subject: $$Excel-Macros$$ ( ) for Array Must???


Hi friends,

when we declare array is it must to give () i mean parantheses.

can i declare array as dim arrayabc or i have to say dim arrayabc()
i know that if we dont write any value in () its ok. but i am not sure if we 
can 
declare array without ()


-- 
----------------------------------------------------------------------------------

Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to