Assign Recurring Macro to Toolbar

  • Thread starter Thread starter NICK
  • Start date Start date
N

NICK

Hi All,

I want to write a macro and then assign it to a button on
my toolbars up the top in Excel. What I want is to write
a macro which selects the top three lines of the open
sheet and then changes the cell background colour to Dark
Blue and then makes the writing white. then i want to be
able to assign that to a new button (like the Bold button)
on a toolbar, so that every time i want to apply this
procedure to the open sheet i can just press this new
button.

Thanks
Nick
 
Hi Nick

Step 1 - Record the macro
put mouse in cell A1
choose tools / macro / record new macr
give it a name (no spaces)
make sure it is stored in the Personal Macro Workbook
click ok
select rows 1, 2 & 3
apply your formatting
click in cell A1
stop recording the macro

Step 2 - Assign macro to toolbar button
choose tools / customise / commands
from the categories (left hand side) choose Macros
from the right hand side drag the smilie face (Custom Button) to the
toolbar where you want your new icon
(leave the customise box open)
right mouse click on the smilie face on your toolbar and choose Assign
Macro
choose your macro & click on OK
right mouse click on smilie face again to look at options for the
buttons appearance
when you have finished close the customise box

this should do what you want

Cheers
JulieD
 
Back
Top