Error code “10” when using format$() function

Means value provided is not a string, you can enclose arguements in quotations eg "BUG" instead of just BUG.