LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default VBA Find Next Available Blank Rows

I'm trying to write a piece of VBA that will search a worksheet for 5
consecutive blank rows in order to paste data there. While I've
written code that does this, however, while the code is searching for
the 5 consecutive blank rows it is changing the value in some cells to
the number 1 and I can't figure out why. Here's the portion of the
code that's doing this - it happens on the
ActiveCell=Application.WorksheetFunction.Find("", a8:a75") line. Any
help is appreciated.

Worksheets("Fees").Range("a8").Activate
Do
ActiveCell = Application.WorksheetFunction.Find("",
"a8:a75")
addrStartingCell = ActiveCell.Address
Worksheets("Fees").Range(addrStartingCell).Activat e

For i = 0 To 5
ActiveCell.Offset(1, 0).Activate
If ActiveCell.Value = "" Then
bolEmpty(i) = True
Else
bolEmpty(i) = False
End If
Next

 
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
Find duplicate rows then deleting them SSHO_99 Excel Worksheet Functions 4 May 4th 07 11:17 AM
Can I delete multiple blank rows collectively? bursar Excel Worksheet Functions 1 January 4th 06 12:10 PM
Excel find text and copy rows Denys-mark Excel Discussion (Misc queries) 2 July 25th 05 11:57 AM
how do I print grid lines for blank rows gailrolfe Excel Discussion (Misc queries) 3 February 25th 05 05:22 AM
how do I print grid lines for blank rows calrolfe Excel Discussion (Misc queries) 0 February 24th 05 07:33 PM


All times are GMT +1. The time now is 04:23 AM.

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"