I have the following code:
If IsError(Application.Find("SKIP", woDataArray(PACKTYPE))) Then
Worksheets(RUNSHEET).Activate
Else
If woDataArray(CUTBACK) > CUTLENGTH Then
Worksheets(SKIPRUNSHEET).Activate
Else
Worksheets(CUTSHEET).Activate
End If
End If
where I have a defined PACKTYPE which if the element of the array is, I want it to activate a certain sheet. But if thats not the case then I want it to check another array element to see if the value of the array elemnt is greater than defined CUTLENGTH to activate SKIPRUNSHEET else to activate CUTSHEET.
But it somehow doesnt seems to go straight to the CUTSHEET even when the elemnt value is greater than CUTLENGTH where it should activate SKIPRUNSHEET.
Why is this the case? Can anyone explain? Thanks.
If IsError(Application.Find("SKIP", woDataArray(PACKTYPE))) Then
Worksheets(RUNSHEET).Activate
Else
If woDataArray(CUTBACK) > CUTLENGTH Then
Worksheets(SKIPRUNSHEET).Activate
Else
Worksheets(CUTSHEET).Activate
End If
End If
where I have a defined PACKTYPE which if the element of the array is, I want it to activate a certain sheet. But if thats not the case then I want it to check another array element to see if the value of the array elemnt is greater than defined CUTLENGTH to activate SKIPRUNSHEET else to activate CUTSHEET.
But it somehow doesnt seems to go straight to the CUTSHEET even when the elemnt value is greater than CUTLENGTH where it should activate SKIPRUNSHEET.
Why is this the case? Can anyone explain? Thanks.