I have a workbook with multiple sheets, some of which end in a 4 character string that tells the code to go and grab information out of that sheet. I have the following basic code structure and it is working great. The problem is that the user may need to add new sheets that meet the "Case" criteria. I want to pull the "Case" values ( "C.01", "C.02", etc) from a range in a worksheet instead of hard coded. Is there a way to do this, or do I need to modify the code each time someone adds a new sheet? Nay help is much appreciated, thanks!
Code:
For Each sh In wkbSource.Worksheets
Select Case Left(sh.Name, 4)
Case "C.01", "C.02", "D.01" 'this is where i want to pull information from a range of cells instead of hard coding.
'do stuff
End Select
Next sh