Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,393
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bold Font Peter Piper Excel Discussion (Misc queries) 2 August 12th 09 09:49 AM
conditional formating bold is true not bold false how victorio0704 Excel Programming 4 June 25th 08 04:29 PM
If ActiveCell.Font.Bold = True Then ... trying to specify a range, not 'entirerow' Winawer Excel Programming 3 April 29th 06 11:08 PM
Bold Font scantor145[_25_] Excel Programming 2 April 17th 06 02:11 PM
How do I show True as a value in Excel B2 if Cell B1 is bold? Gary Excel Worksheet Functions 3 February 27th 06 07:49 PM


All times are GMT +1. The time now is 07:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"