Creating an array based on worksheet index
I'm trying to create an array based on the names of the worksheets in a
workbook, using the index as the variable.
I keep getting a "constant" error, can I create a array this way?
Sub test2()
Dim wrksht(num)
Dim num As Byte
Dim WS As Worksheet
num = ActiveWorkbook.Worksheets.Count
For Each WS In Worksheets
wrksht(num) = WS.name + 1
Range("A10").Formula = wrksht(num)
ActiveCell.Offset(1, 0).Select
Next WS
End Sub
THANK YOU!!
--
Jack of all trades... master of none..
|