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: 37
Default Loop macro error

Hi,

I am trying to write a macro that will loop through my spreadsheet until
there is no more data. I want it to start at row 7, then colour the row (or
just cells A to AD) to colour 35. I have written the macro below, however am
coming up with an error that states there is no Do when trying to run it.

Can anyone help?


Range("7:7").Select 'Set range to start point
Do While ActiveCell.Value < ""
With Selection.Interior.ColorIndex = 35
ActiveRange.Offset(6, 0).Select
Loop

Thanks
Kirsty
 
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
Do while loop error.... guy Excel Programming 4 December 12th 06 01:37 PM
Error message when using the Solver in a VBA macro loop Mathieu Fournier Excel Programming 2 March 1st 05 02:36 PM
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error rdavis7408 Excel Programming 1 August 25th 04 03:54 AM
loop error Sam Excel Programming 1 September 18th 03 03:09 PM


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