View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default VBA code for outline border

Otto,

I'm assuming you want to create a single border around a range of cells, not
setting the borders for each individual cell in the range. Try

Range("C3:D20").BorderAround Weight:=xlMedium

You could modify this to

Selection.BorderAround Weight:=xlMedium
' or
ActiveCell.BorderAround Weight:=xlMedium

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)


"Otto Moehrbach" wrote in message
...
Excel XP & Win XP
When I record a macro and place an outline border, the recorder of course
lays down a bunch of lines encompassing every facet of the border.
Is there a simple command to produce an outline border? Thanks for your
time. Otto