How have you connected the macro code to the button? Did you edit the button definition?