Might be a dumb question, but I have used the following to create an array in VBA -
The array [Month Days] is output as a 2-Dimensional array, but since the information that is input into the array comes from a row it essentially makes a 2-Dimensional array one column wide. Why? How do I change it to a 1-Dimensional array so I don't have to solve for a 2-Dimensional array later on in the code?
VBA Code:
Dim CurrMonth As String
Dim PosMatch As Variant
Dim MonthDayCount As Variant
Dim MonthDays As Variant
CurrMonth = Format$(Date, "MMMM")
With Worksheets("Tracker")
PosMatch = Application.Match(CurrMonth, .Range("A:A"), 0)
MonthDayCount = .UsedRange.Rows(PosMatch).Columns.Count - 2
ReDim MonthDays(1 To MonthDayCount)
MonthDays = .Range(.Cells(PosMatch, 2), .Cells(PosMatch, MonthDayCount))
The array [Month Days] is output as a 2-Dimensional array, but since the information that is input into the array comes from a row it essentially makes a 2-Dimensional array one column wide. Why? How do I change it to a 1-Dimensional array so I don't have to solve for a 2-Dimensional array later on in the code?