ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel macro "loop" (https://www.excelbanter.com/excel-programming/371078-excel-macro-loop.html)

Leon Obers

Excel macro "loop"
 

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
---------------------------------------------------------------

--
Vr.groet - regards, Léon Obers


NickHK

Excel macro "loop"
 
Leon,
You mean something like :

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

NickHK

"Leon Obers" wrote in message
...

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
---------------------------------------------------------------

--
Vr.groet - regards, Léon Obers




Leon Obers

Excel macro "loop"
 


NickHK wrote:
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.


--
Vr.groet - regards, Léon Obers



All times are GMT +1. The time now is 12:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com