It sounds like you typed it right in the properties window. In the On Click field, click the little arrow on the right and choose [Event Procedure]. Then click the button with the three dots to the right of that. That will open the VBA window. Paste your text in the Click sub procedure that comes up. Hopefully that should work.