In VBA In the module add the macro as
and then right click on the button and assign the macro to the button.
Try and tell if it works.
Code:
Sub button1_click ()
-----------
-------
End Suband then right click on the button and assign the macro to the button.
Try and tell if it works.

