Hi @e4excel,
Try this :
Dim Str_Names As String
Dim my_array() As String
' or create a public variable my_array() so that it can be referred anywhere in your code. Put this variable in a module and initialize it when you open this workbook.
'this variable can be used to store the sheet names
Str_Names = "one,two,three,four,five"
'Convery the str_names into an array
my_array = Split(Str_Names, ",")
'This is a zero based array - Hence you will get a count of 4.
'loop through the array
For x = 0 To UBound(my_array)
Debug.Print my_array(x)
Next
Bookmarks