Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Do Until
Hello Roger, Change your code to this... Code: -------------------- Do While Not IsEmpty(ActiveCell) |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|