Excel macro "loop"

  • Thread starter Thread starter Leon Obers
  • Start date Start date
L

Leon Obers

To avoid several hand mader starts (400 x) of a macro I want to edit the
VSB macro in a loop. I am not familiar with VSB but do have some
experiance with other database languages.
What is the exact way / commands to write down (edit) the macro?

Someting like this.

---------------------------------------------------------------
Start loop
if n < 401
n = n+1
{a macro workaround with move, copy and past}
endif
end loop
 
The code is:
Do While n < 401
n = n + 1
'{a macro workaround with move, copy and past}
Loop

You might also have:
Do
n = n + 1
'{a macro workaround with move, copy and past}
Loop While n < 40
 
Leon,
You mean something like :

Dim i as long
For i=1 to 400
call YourMacro
next

NickHK
 
NickHK said:
Leon,
You mean something like :

Dim i as long
For i=1 to 400
call YourMacro
next

Great, works as a train.
Thank you very much for this sollution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top