View Full Version : [SOLVED:] Change the font of a specific cell
Kilroy
08-23-2016, 12:42 PM
Hello all I'm trying to change the font of a specific cell. I have tried recording a macro but it isn't working. I need the 4th cell of row 1 to change to font size 10. What I have so far is:
Sub column4font()
'
' column4font Macro
' column4font
'
Selection.SelectCell
Selection.Font.Size = 10
End Sub
gmaxey
08-23-2016, 12:50 PM
What table? The following will process the table with the insertion point:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oTbl As Table
Set oTbl = Selection.Tables(1)
oTbl.Cell(1, 4).Range.Font.Size = 10
lbl_Exit:
Exit Sub
End Sub
Kilroy
08-23-2016, 01:04 PM
Thanks Greg works perfect. I'm still trying to figure the whole recording a macro thing and cannot figure out how to target specific cells during this process.
gmaxey
08-23-2016, 01:13 PM
At best the recorder is like half a yardstick.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.