Setting up macros

Stuart Little

Board Regular
Joined
Mar 4, 2002
Messages
64
Please could anyone advise me on how to set up a macro. I like to use the same font all the time but i have to change the default every time i log on, and also when i download data i have to highlight it all and change it. So is there a way of setting up a macro so that i can just press a button and the font is changed automatically. Fussy I know but please help!!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
this will change the font to times new roman
Sub change_font()
With Selection.Font
.Name = "Times New Roman"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
End Sub

To record a Marco go to tools Marco record new Marco, give it a name, what ever you do after this will be record when you are done click stop recording, you can assign the Marco to a button shortcut key or press alt and f8 to run it. Hope this helps
This message was edited by paul b on 2002-03-05 15:47
 
Upvote 0
Stuart,

You can also change the "default" font in the Tools>Options>General dialog box. Another method is to save a template named "book.xlt" in your templates folder. Configure the template how ever you like (I change things like font, font size, zoom, default print margins, etc.) and then Excel will use that "book" whenever you open Excel or create a new workbook. You can do the same thing with a sheet ("sheet.xlt").


enjoy

Bariloche
 
Upvote 0

Forum statistics

Threads
1,223,383
Messages
6,171,772
Members
452,423
Latest member
Rene M

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top