Hello folks,
I'm trying to add what's on the left of "/", but sometimes the cell does not contain that character, and I am having trouble handling the error:
Whenever the cell does not contain "/", I get an Invalid Procedure error on the fbormk line.
On the other cases the code runs fine.
Thanks for the help
I'm trying to add what's on the left of "/", but sometimes the cell does not contain that character, and I am having trouble handling the error:
Code:
Dim fbormk as Variant
fbormk = Left(Cells(ActiveCell.Row, rmks), InStr(1, Cells(ActiveCell.Row, rmks), "/") - 1)
If IsError(fbormk) = True Then
fbormk = Cells(ActiveCell.Row, rmks)
Else
'fbormk = Left(Cells(ActiveCell.Row, rmks), InStr(1, Cells(ActiveCell.Row, rmks), "/") - 1)
End If
mail_body_message = Replace(sup_msg, "^", Cells(ActiveCell.Row, icao) & "/" & fbormk)
Whenever the cell does not contain "/", I get an Invalid Procedure error on the fbormk line.
On the other cases the code runs fine.
Thanks for the help