![]() |
initialization of an array????
Hi,
I need to initialize MyArray (7) By €śMonday€ť. €śTuesday€ť, I tried MyArray = (€śMonday€ť,€ťTuesday€ť,€ťWednesday€ť,,) But it doesnt work!?? |
initialization of an array????
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!?? |
initialization of an array????
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!?? |
initialization of an array????
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!?? |
All times are GMT +1. The time now is 01:23 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com