i'm new excel vba , having trouble initialising array of dates on single line using brackets.
i know how variant data types:
arrayvariant = array("hello", "world")
, string data types:
arraystring = split("hello,world",",")
, can initialise array of dates initialising each item individually:
arraydates(0) = #01/01/1900#
etc
can't find way initalise date array on single line. possible in vba?
you can use same approach string type, converting each value date type, using cdate():
arraydates = array(cdate("1/1/2000"), cdate("2/2/2000"), cdate("2/3/2004"))
by using approach manage fill array in 1 line.
Comments
Post a Comment