Error compiling

Thank you everybody for the quick reply and your methods your methods all work!