Hello guru's. I have an if statement within a select case statement and the code for some reason or another is unreachable. No compiler errors but its not jumping into the "if" statement.
Here's the code:
Any ideas?
Here's the code:
Code:
Select Case ActiveCell.Offset(0, 1).Value
Case "Expense"
MsgBox "Found Expense" 'gets here
a = Application.WorksheetFunction.IsNumber(Application.WorksheetFunction.Search(" " & "DEPRECIATION" & " ", " " & UCase(ActiveCell) & " "))
b = Application.WorksheetFunction.IsNumber(Application.WorksheetFunction.Search(" " & "AMORTIZATION" & " ", " " & UCase(ActiveCell.Value) & " "))
If a = "True" Or b = "True" Then 'doesn't get here
'do something
Else
MsgBox "in else statement" 'doesn't get here
'do stuff
End If
end select