LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Repeat a marco with number of times or loop until End

Hi Elton,

I see that you checked my second post as the correct answer but based on
your later comment that the loop should run until error and you don't know
how many times that will be then you should replace the loop code with the
following code and then it does not matter if less than or more than 100
loops.

The called sub code can remain as per my previous post.

Sub RunInLoop()

errorFlag = False 'Initialize to false

Do While errorFlag = False
Application.Run "SkyDaysHour_X31_H2_Hour"
Loop

End Sub

--
Regards,

OssieMac


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
repeat number multiple times Brenda from Michigan Excel Discussion (Misc queries) 4 May 7th 09 01:17 PM
Repeat text a number define of times Alexandra Lopes Excel Worksheet Functions 6 November 18th 08 05:37 PM
Why can the number of iterations repeat many times as a loop?? Jorge Luis Excel Discussion (Misc queries) 0 February 1st 08 04:15 PM
Repeat statements "x" number of times... Frantic Excel-er Excel Discussion (Misc queries) 14 July 1st 05 04:19 PM
how do I get a calculation to repeat various number of times? weelittlekim Excel Worksheet Functions 1 October 27th 04 08:13 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"