Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default find within a named range, then deselect the range

Bob,
OK, change
..EntireColumn.Width = 10
to
..ColumnWidth = 10

If you record a macro (ToolsMacroRecord New MacroOK) whilst you perform
your desired action, you can see the code required to achieve it.
Not always the most efficient code, but it will shown the correct object,
properties and syntax to use.

NickHK

"Bob Mouldy"
roups.com...
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



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
Find in Named Range problem (2nd Try) G.R. New Users to Excel 2 February 27th 08 08:17 PM
Find Row in a named range Raul Excel Worksheet Functions 3 November 24th 07 12:41 AM
Find Cell in Named Range David Excel Worksheet Functions 3 May 8th 07 06:00 AM
VBA: find number of columns in named range? George[_3_] Excel Discussion (Misc queries) 3 April 30th 07 05:35 PM
How to find all formulas that used a certain named range Laurence Lombard Excel Discussion (Misc queries) 2 October 25th 05 08:15 AM


All times are GMT +1. The time now is 06:52 PM.

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

About Us

"It's about Microsoft Excel"