View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Its so simple! Why won't it work!

I'm glad it works. You rarely need to Select a range, and doing
so is a very slow operation. Instead of Selecting, you can use a
Range variable Set to the appropriate range, and use that
variable. For example, instead of


Range("A1").Select
Selection.Font.Bold = True

you could use

Range("A1").Font.Bold = True
or
Dim Rng As Range
Set Rng = Range("A1")
Rng.Font.Bold = True

Because Selection can be any type of object in addition to a
range (a Shape, a Chart, etc), a lot of code must execute behind
the scenes to determine what type of object Selection actually
is.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Kevin O'Neill" wrote in message
oups.com...
Chip thanks. Worked like a charm. I'm not a programmer by
trade, my
Boss always tells me there's no need to 'select' things, but I
always
do it anyway. I don't know any better.