Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Andre
 
Posts: n/a
Default formula for selecting all cells

I'm trying to create a macro that will select all my cells from the beginning
(top left) to the last one (bottom right corner) and then put a border around
them. Any help is appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.misc
JE McGimpsey
 
Posts: n/a
Default formula for selecting all cells

one way:

Dim vSides As Variant
Dim i As Long
vSides = Array(xlEdgeTop, xlEdgeBottom, xlEdgeLeft, xlEdgeRight)
With ActiveSheet.UsedRange.Borders
For i = 0 To UBound(vSides)
With .Item(vSides(i))
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Next i
End With


In article ,
"Andre" wrote:

I'm trying to create a macro that will select all my cells from the beginning
(top left) to the last one (bottom right corner) and then put a border around
them. Any help is appreciated.

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
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
How can I get excel to ignore formula in dependant cells... Ted Excel Worksheet Functions 4 November 21st 05 10:03 PM
self-updating formula BorisS Excel Discussion (Misc queries) 3 November 17th 05 01:13 PM
quick way to copy-paste a formula linked to cells in another file iniakupake Excel Worksheet Functions 2 September 26th 05 03:56 AM
trying to create an (almost) circular formula between cells and data validated cells with lists KR Excel Worksheet Functions 0 May 12th 05 07:21 PM


All times are GMT +1. The time now is 01:08 AM.

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"