LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Loop has goofy message all of a sudden

On Jan 3, 6:53*pm, Don Guillett wrote:
On Jan 3, 2:31*pm, Revenue wrote:





I have the routine below in many spreadsheets and it has worked for a
long time up until now. When I run this macro now, I get a message as
follows:


"Code execution has been interrupted" and the options are Continue,
end, or debug. Pushing continue *makes it continue until it encounters
the next Do While portion. What gives?


I've never had this before with the "Continue" option. If I choose
debug, it highlights the Loop While lines.


Sub Date_Prompt()


Do
prmo = Application.InputBox("Enter Production Month" & _
* " Between 1 and 12 Inclusive)", Type:=1)


Loop While prmo < 1 Or prmo 12
Do
pryr = Application.InputBox("Enter Production Year" & _
* "Between 2000 and 2021 Inclusive)", Type:=1)
Loop While pryr < 2000 Or pryr 2021
Range("prmo").Value = prmo
Range("pryr").Value = pryr
End Sub


What are you trying to do?- Hide quoted text -

- Show quoted text -


Now the silly thing is working properly today. Who knows sometimes
what these machines are trying to do?

 
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
How do I get a Yes/No message box to loop John Excel Discussion (Misc queries) 1 February 14th 09 12:54 PM
Message box and loop Mark Berry Excel Programming 4 October 31st 07 02:06 PM
all of a sudden - something's different davey1108 Excel Discussion (Misc queries) 3 September 16th 07 05:09 AM
Error Message in Loop Joe Fish Excel Programming 3 November 27th 05 12:35 AM
Error message when using the Solver in a VBA macro loop Mathieu Fournier Excel Programming 2 March 1st 05 02:36 PM


All times are GMT +1. The time now is 10:58 AM.

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"