LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Move msgbox out of loop

You guys are the greatest. I never thought I would have so many options.
Thanks,
Phil

"Phil Floyd" wrote in message
...
Here is the code I am using to check for cells being filled in.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
For Each cel In Range("FILLIN01")
If IsEmpty(cel) Then
Ans = MsgBox("Sheet not complete! Would you like to complete
sheet now?", vbYesNo + vbQuestion, "Incomplete Sheet!")
If Ans = vbYes Then
Cancel = True
End If
End If
Next cel
End Sub

There are several cells in range FILLIN01. If 6 of these are not filled
out, I get the message box 6 times. How do I get the message box only

once
if any of the cells in the range are blank?

Thanks,
Phil






 
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
Excel arrows don't move black box but move the window Thebit Excel Discussion (Misc queries) 1 April 13th 09 02:06 AM
Msgbox loop John New Users to Excel 2 February 13th 09 03:57 PM
Loop column A and delete and move on condition Rob Excel Programming 6 January 15th 05 03:14 PM
Macro to move, create formulas and loop NewMacro Excel Programming 5 February 2nd 04 10:12 PM
HELP!!!! Can't stop a loop (NOT an infinite loop) TBA[_2_] Excel Programming 3 December 14th 03 03:33 PM


All times are GMT +1. The time now is 03:34 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"