J
jday
I have a program in which I need to select multiple consecutive sheets and
perform a specific function. The sheets are sequential starting with Sheet4
all the way through Sheet23. I don't want to be concerned about the 'actual'
sheet names that the user may change periodically---therefore, I need to
reference the sheets based upon their underlying sheet reference as noted
above. Currently I am trying to use this code, but am getting a 'Type
Mismatch' error. Can someone tell me what I am doing wrong?
Sheets(Array(Sheet4, Sheet5, Sheet6, Sheet7, Sheet8, Sheet9, _
Sheet10, Sheet11, Sheet12, Sheet13, Sheet14, Sheet15, Sheet16, _
Sheet17, Sheet18, Sheet19, Sheet20, Sheet21, Sheet22, Sheet23)).Select
perform a specific function. The sheets are sequential starting with Sheet4
all the way through Sheet23. I don't want to be concerned about the 'actual'
sheet names that the user may change periodically---therefore, I need to
reference the sheets based upon their underlying sheet reference as noted
above. Currently I am trying to use this code, but am getting a 'Type
Mismatch' error. Can someone tell me what I am doing wrong?
Sheets(Array(Sheet4, Sheet5, Sheet6, Sheet7, Sheet8, Sheet9, _
Sheet10, Sheet11, Sheet12, Sheet13, Sheet14, Sheet15, Sheet16, _
Sheet17, Sheet18, Sheet19, Sheet20, Sheet21, Sheet22, Sheet23)).Select