LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default border for if

Hi all.
On one of my macros, I want to set it up to run through a single sheet until
it finds the last row of contents.
However, I want it to only do select cells, that are bounded by borders.
I.e., instead of my having to activate for each cell group, I'd like to

I thought something like this would do it, but I'm missing something.
dim i as integer
dim myRng as range


for i = 1 to lastcell ' where lastcell is the last row with data.

set myRng = nothing

set myRng = ?

if myRng.Border(xlEdgeBottom) < true then

Run "MyMacro"

Else : myRng.cells(?) = offset (1,0) 'down one row, zero columns

end if

next i

I'm sure something needs to be stated differently, I just haven't figured
out what, yet.
Thank you.
Best.
 
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
border on last cell of page effects border on beginning cell of ne GaryE Excel Discussion (Misc queries) 0 March 23rd 09 05:47 AM
Border around range working -Border for cells within range not wor Gwen Excel Programming 3 October 23rd 07 08:45 PM
Apply bottom border only on filled cells, leaves blank cells without border? StargateFan[_3_] Excel Programming 4 April 8th 07 05:39 PM
Border help erikkeith via OfficeKB.com Excel Programming 8 May 7th 06 01:22 PM
Changing the border of one cell s/n change the border of adjacent gjanssenmn Excel Discussion (Misc queries) 2 October 5th 05 08:35 PM


All times are GMT +1. The time now is 02:16 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"