Hi,
To get the code - turn on the recorder and do the steps you want the macro
to do - choose Tools, Macro, Record New Macro. Give the macro a name without
spaces and click OK. Do the steps. Turn the recorder off - choose Tools,
Macro, Stop Recording.
For a button - right-click any toolbar and choose Forms. Click the Button
button and then click or drag in the sheet. When you release the mouse the
Assign Macros dialog box will appear, pick your macro.
Test, and get back to use with questions if necessary - as a new post.
If this helps, please click the Yes button.
Cheers,
Shane Devenshire