Hi
Can anyone help me with code to do loop for next
I need to run the 18 times but after the first loop i need to call another macro then return back and loop the 2nd time.
Kind Regards
Penny
Hi
Can anyone help me with code to do loop for next
I need to run the 18 times but after the first loop i need to call another macro then return back and loop the 2nd time.
Kind Regards
Penny
Penny,
That's a really vague description. Here's some generic code that hopefully you can adapt:
![]()
Please Login or Register to view this content.
Hope that helps,
~tigeravatar
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
Not 100% sure what you're asking for...
Runs 18 times, then after the 18th time, runs a second macro?
Runs 1 time, executes another macro, then runs 17 more times?
Run 1 time, executes another macro, runs 1 more time, executes another macro, and this is repeated a total of 18 times?
Side Note: Why are you executing another macro from within the macro... why not just have the entire macro self-contained within itself?
If it's the latest:
for i = 1 to 18
Do stuff
Call other macro
Next i
Going for Guru! Click the Star to the bottom left of this post if I helped!
![]()
Please Login or Register to view this content.
Gary's Student
Hi
Thanks so far . My code looks in a table of 18 rows, it then opens the first file, then i need to run another macro to copy info into that file, then call another macro also that loops through another table of 18 rows oncw that is done it must loop from the beginning on row 2.
Thanks Penny
Hi
I have a workbook that has a table of 18 rows in it the loop goes to the first row and opens that file, then i need to run another macro to copy specfic info, then run another macro that has a different table also 18 rows it onpoens that file in the first row, once this is done i need it to return back and loop to the second row in the first file , and in the second macro.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks