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: 14
Default Newbie repeat question

Hi,
so I want a parrt of my code to repeat until there is a line format found
on the cell which is already being searched for, my code is below. What am I
missing here?
My goal here is to format a seperation line on a page when the macro finds a
particular word in a column (the word is the end of each section of listing
for a sales person).
The code listed below does what I want but does not stop and continues
indefinately.
All help VERY much appreciated
Patrick


Sub Find2()
Do
Dim word As String
word = "ATM"
Cells.Find(What:=word, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False _
, SearchFormat:=False).Activate
ActiveCell.EntireRow.Select
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Cells.FindNext(After:=ActiveCell).Activate
Loop Until (LineStyle = xlContinuous)
End Sub


 
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
Newbie Formula Question - how to get formula to repeat in each subsequent row? [email protected] New Users to Excel 2 January 10th 10 05:02 PM
Real Newbie newbie question Dave New Users to Excel 0 January 10th 07 07:55 PM
If Then Question from Newbie. . . hospitalgreg Excel Discussion (Misc queries) 6 October 16th 06 08:16 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
Newbie With A Question Michael Excel Worksheet Functions 0 July 28th 05 11:50 PM


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