Hi
I am trying to get list of all worksheets, popup Dialog box to select a worksheet, then work with it.
I thought cud store the sheetname in array, but does not work, please suggest. Thank you
I am trying to get list of all worksheets, popup Dialog box to select a worksheet, then work with it.
I thought cud store the sheetname in array, but does not work, please suggest. Thank you
VBA Code:
Sub ListSheets()
Dim ws As Worksheet
Dim i As Integer
Dim ArrayValues As ArrayList ' This does not work'
Set ArrayValues = New ArrayList ' This does not work'
For i = 1 To ThisWorkbook.Worksheets.Count
ArrayValues.Add ThisWorkbook.Worksheets(i).name
Next sht
ListBox1.List = ArrayValues
End Sub