Hi all,
I use to work with Arrays, but I populate them in a manual way. This time I need to populate the array with the data (numbers as text) present in a range.
What's my goal? I've a range (Sheets("Values").range("K6:K17")) with some numbers stored as text. These numbers are the names of certain tabs. The array loaded with those names will be the input of a subsequent loop, to work on those selected tabs.
I want to apply an IF condition: if any of the cells in range K6:K17 is empty, discard it and do not load it into the array. In this way, the range K6:K17 has 14 cells and maybe only 4 have data. If I do not load those empty values in myArray, the array will have a dimension of 4 and when I will loop over the myArray I would be able to use the boundaries LBound(myArray) and UBound(myArray).
I've coded the following chain:
I obtain the following error:
I try to debug the error, and it highlights:
Thank you in advance!!!
Bookmarks