Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I need to initialize MyArray (7) By Monday. Tuesday, I tried MyArray = (Monday,Tuesday,Wednesday,,) But it doesnt work!?? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Right out of VBA help file.
MyWeek = Array("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun") "Barb" wrote: Hi, I need to initialize MyArray (7) By Monday. Tuesday, I tried MyArray = (Monday,Tuesday,Wednesday,,) But it doesnt work!?? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you can start with Sunday, perhaps...
Sub Demo() Dim m m = Application.GetCustomListContents(2) 'Otherwise adjust ... m = Array(m(2), m(3), m(4), m(5), m(6), m(7), m(1)) End Sub -- Dana DeLouis "Barb" wrote in message ... Hi, I need to initialize MyArray (7) By "Monday". "Tuesday", I tried MyArray = ("Monday","Tuesday","Wednesday",,) But it doesn't work!?? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Barb,
Try something like Dim V(1 To 7) As String ' Best practice to specify both lower and upper bounds Dim N As Long For N = 1 To 7 V(N) = Format(DateSerial(2001, 1, N), "dddd") Next N "Barb" wrote in message ... Hi, I need to initialize MyArray (7) By Monday. Tuesday, I tried MyArray = (Monday,Tuesday,Wednesday,,) But it doesnt work!?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Test Initialization of an Array | Excel Programming | |||
UserForm Initialization | Excel Programming | |||
Userform Initialization | Excel Programming | |||
ShowDataForm Initialization | Excel Programming | |||
List box initialization | Excel Programming |