View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Carrie_Loos via OfficeKB.com Carrie_Loos via OfficeKB.com is offline
external usenet poster
 
Posts: 116
Default Can't get the macro to quit

Thanks for your help Mike - I could not have moved forward without your info..
...still having a couple of issues but now that I know how it's reading I can
fix it.

Mike H wrote:
Hi,

When you run Auto_Open you and the user responds NO ultimately The code will
return to that routine at the line after
If ans = vbNo Then Call Begin_Week
The next line is
Call Daily
So if the user presses NO then both macros are called and I doubt that's
what you intend.

If you put both calls in an If loop then when execution returns to auto_open
it will be after the end if so that won't happen

Sub auto_open()
Dim ans As Long
ans = MsgBox("Is this the end of the Week?", vbYesNo)
If ans = vbNo Then
Begin_Week
Else
Call Daily
End If
End Sub

Mike

This is perplexing.........I have three macro's (I removed all the 'work'
portion of the code to shorten it) but basically, If I follow the path of

[quoted text clipped - 54 lines]
€˜Begin Input
End Sub


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200805/1