zmau
asked on
vbScript in Excel - How to run a macro until there are no more lines ?
Hi!
I have a macro (it does some work on the current line), and I want to run it "until there are no more lines".
Basically I wany to have a macro that :
zmau
I have a macro (it does some work on the current line), and I want to run it "until there are no more lines".
Basically I wany to have a macro that :
loop
1) Runs macro_A
2) Go down one line
until the current line is empty.
Thanks1) Runs macro_A
2) Go down one line
until the current line is empty.
zmau
ASKER
Thanks,
How do I go down one line ?
zmau
How do I go down one line ?
zmau
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
LastRow = ActiveSheet.UsedRange.Rows
then feed the LastRow variable in loop. something like..
while currentRow is less than LastRow
do your macro
For added reference on determining last row visit http://www.mrexcel.com/td0058.html