View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Mouldy Bob Mouldy is offline
external usenet poster
 
Posts: 2
Default find within a named range, then deselect the range

Thanks, this is really helpful.

I'm getting a debug error on the .EntireColumn line. I'm not a
programmer... is there something simple that's wrong about this line of
code? When I remove it, the command works fine (bold-facing the correct
header).

Sub Test()
'
' Test Macro
' Macro recorded 8/22/2006 by Bob Mouldy
'
' Keyboard Shortcut: Ctrl+Shift+T
'

Dim FindHeader As Range
Set FindHeader = Worksheets("Sheet1").Range("Headers").Find("Channe l")
With FindHeader
.Font.Bold = True
.EntireColumn.Width = 10
End With

End Sub

thx,
bob