Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
While doing some housekeeping on some old VBA procedures, I stumbled on this
anomaly of Application.Quit not executing out of a Do loop. Just wondered if someone can explain why it is necessary to Exit Do before the Quit method will execute? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
VBA's ability, on the odd occaision, to obfuscate what must be underlying
machine code logic, to a mirage of strange magic, leaves me stunned- Just as well we love it eh? "JLGWhiz" wrote: While doing some housekeeping on some old VBA procedures, I stumbled on this anomaly of Application.Quit not executing out of a Do loop. Just wondered if someone can explain why it is necessary to Exit Do before the Quit method will execute? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See the difference of commenting out the DoEvents.
Private Sub CommandButton1_Click() Dim i As Long, j As Long For i = 1 To 100000 For j = 1 To 100000 If i = 500 And j = 1000 Then Application.Quit Next Debug.Print i, j DoEvents Next End Sub NickHK "JLGWhiz" wrote in message ... While doing some housekeeping on some old VBA procedures, I stumbled on this anomaly of Application.Quit not executing out of a Do loop. Just wondered if someone can explain why it is necessary to Exit Do before the Quit method will execute? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
difference application.quit & application.close | Excel Programming | |||
application.quit | Excel Programming | |||
Application.Quit | Excel Programming | |||
macro to close excel application other than application.quit | Excel Programming | |||
application.quit will not shut off application | Excel Programming |