Hi,
I have a module that within it I have to use the same CASE argument several times as it loops through a number of different processes as per below:
There is the potential that this may need adjusting in the future so rather than having to adjust the above case number string several times I was hoping to be able to declare the list once and then reference to it each time its used, something like the below:
Understandably this doesn't work as strCase is declared as a text string and it needs to be numbers. I have tried a few other options but none have worked. Is there any way of achieving this?
I have a module that within it I have to use the same CASE argument several times as it loops through a number of different processes as per below:
Code:
Select Case rstDetail.Fields("CategoryID")
Case 20, 32, 33, 34, 35, 36, 37, 56, 58, 59, 60, 125
There is the potential that this may need adjusting in the future so rather than having to adjust the above case number string several times I was hoping to be able to declare the list once and then reference to it each time its used, something like the below:
Code:
Dim strCase As String
strCase = "20, 32, 33, 34, 35, 36, 37, 56, 58, 59, 60, 125"
Select Case rstDetail.Fields("CategoryID")
Case strCase
Understandably this doesn't work as strCase is declared as a text string and it needs to be numbers. I have tried a few other options but none have worked. Is there any way of achieving this?