Do Until
I used "Do Until activecell = 0" in my prior Excel program but it doesn't
work in Excel 2002. Any suggestions? I would like a solution that solves for blank rather than zero. Thanks, Roger |
Do Until
Hi Roger,
You could use the IsEmpty function to test for blanks, e.g.: Sub Tester() Dim rng As Range Dim i As Long Set rng = Range("A1:A10") Do Until IsEmpty(rng(i + 1)) 'Do something i = i + 1 Loop End Sub --- Regards, Norman "Roger" wrote in message ... I used "Do Until activecell = 0" in my prior Excel program but it doesn't work in Excel 2002. Any suggestions? I would like a solution that solves for blank rather than zero. Thanks, Roger |
Do Until
Hi Roger
It's an awful programming style, pardon my french, but it works in Excel 2002 also: Sub test() ActiveCell = 900 Do Until ActiveCell = 0 ActiveCell = ActiveCell - 1 Loop End Sub So your problem is elsewhere. HTH. Best wishes Harald "Roger" skrev i melding ... I used "Do Until activecell = 0" in my prior Excel program but it doesn't work in Excel 2002. Any suggestions? I would like a solution that solves for blank rather than zero. Thanks, Roger |
Do Until
Hello Roger, Change your code to this... Code: -------------------- Do While Not IsEmpty(ActiveCell) |
Do Until
Thanks so much to the 3 of you for your suggestions. I chose Leith's
because of its simplicity. Roger "Roger" wrote in message ... I used "Do Until activecell = 0" in my prior Excel program but it doesn't work in Excel 2002. Any suggestions? I would like a solution that solves for blank rather than zero. Thanks, Roger |
All times are GMT +1. The time now is 02:18 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com