Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selection.Font.Bold = True
Hello from Steved
The below works fine but I would like to bold the, "REDUCED PEAK 2008 - 2009" please, I've not sure where to insert Selection.Font.Bold = True as it is not working, What do I need to do please to have this working, I thankyou. Sub REDUCEDPEAK() Cells.Replace What:="Auckland", Replacement:="REDUCED PEAK 2008 - 2009", _ LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _ False, ReplaceFormat:=False Selection.Font.Bold = True Selection.Copy Application.CutCopyMode = False ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)" ActiveWorkbook.Close SaveChanges:=False ActiveCell.Offset(2, 0).Select Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selection.Font.Bold = True
Do this:
Turn on Macro Record In some cell type: Mary had a little lamb. It fleece was white Select "little lamb" and make bold Turn off Recorder Look at the subroutine in VBA It will have something like With ActiveCell.Characters(Start:=6, Length:=12).Font .Name = "Calibri" .FontStyle = "Bold" .Size = 11 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ThemeColor = xlThemeColorLight1 .TintAndShade = 0 .ThemeFont = xlThemeFontMinor End With best wishes -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "Steved" wrote in message ... Hello from Steved The below works fine but I would like to bold the, "REDUCED PEAK 2008 - 2009" please, I've not sure where to insert Selection.Font.Bold = True as it is not working, What do I need to do please to have this working, I thankyou. Sub REDUCEDPEAK() Cells.Replace What:="Auckland", Replacement:="REDUCED PEAK 2008 - 2009", _ LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _ False, ReplaceFormat:=False Selection.Font.Bold = True Selection.Copy Application.CutCopyMode = False ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)" ActiveWorkbook.Close SaveChanges:=False ActiveCell.Offset(2, 0).Select Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selection.Font.Bold = True
Hello Bernard from Steved
I thankyou Below is what I achieved. Sub REDUCEDPEAK() Cells.Replace What:="Auckland", Replacement:="REDUCED PEAK 2008 - 2009", _ LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _ False, ReplaceFormat:=False Cells.Find(What:="REDUCED PEAK 2008 - 2009", After:=ActiveCell, LookIn:= _ xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _ xlNext, MatchCase:=False, SearchFormat:=False).Activate Selection.Font.Bold = True Application.CutCopyMode = False ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)" ActiveWorkbook.Close SaveChanges:=False ActiveCell.Offset(2, 0).Select Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True End Sub "Bernard Liengme" wrote: Do this: Turn on Macro Record In some cell type: Mary had a little lamb. It fleece was white Select "little lamb" and make bold Turn off Recorder Look at the subroutine in VBA It will have something like With ActiveCell.Characters(Start:=6, Length:=12).Font .Name = "Calibri" .FontStyle = "Bold" .Size = 11 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ThemeColor = xlThemeColorLight1 .TintAndShade = 0 .ThemeFont = xlThemeFontMinor End With best wishes -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "Steved" wrote in message ... Hello from Steved The below works fine but I would like to bold the, "REDUCED PEAK 2008 - 2009" please, I've not sure where to insert Selection.Font.Bold = True as it is not working, What do I need to do please to have this working, I thankyou. Sub REDUCEDPEAK() Cells.Replace What:="Auckland", Replacement:="REDUCED PEAK 2008 - 2009", _ LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _ False, ReplaceFormat:=False Selection.Font.Bold = True Selection.Copy Application.CutCopyMode = False ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)" ActiveWorkbook.Close SaveChanges:=False ActiveCell.Offset(2, 0).Select Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Bold Font | Excel Discussion (Misc queries) | |||
conditional formating bold is true not bold false how | Excel Programming | |||
If ActiveCell.Font.Bold = True Then ... trying to specify a range, not 'entirerow' | Excel Programming | |||
Bold Font | Excel Programming | |||
How do I show True as a value in Excel B2 if Cell B1 is bold? | Excel Worksheet Functions |