I have a textbox (tb_empl_num2) in my userform. The user is expected to enter a 5 digit number.
As the value entered into the textbox is text (despite all numbers being entered), I use clng(tb_empl_num2) to convert the text to a long number.

I am trying to catch the error when the user enters something other than 5 numeric digits, perhaps something with a letter or symbol in it (eg "alpha"). If they attempt to enter such, the clng(tb_empl_number2) will cause an error since it can't convert the alpha characters.

If IsError(CLng(empl_no2.Value)) = True Then MsgBox "Error"
is something I'm trying to do, but I'm getting a 'type mismatch error'