View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
broro183[_143_] broro183[_143_] is offline
external usenet poster
 
Posts: 1
Default Cannot Dismiss the MsgBox



hi all,

With your current looping approach one of the two message boxes is
going to appear for every single one of the 10,000-12=9,988 rows (let
alone when you factor in each of the columns which potentially can make
the amount much larger). This makes me suspect that each time you press
okay, you are then seeing the next messagebox quickly appear which makes
it seem "that the message box doesn't go away". You could check this by
changing your msgbox title eg:

Code:
--------------------
sgBox "Please make additional corrections", vbExclamation +
vbOKCancel, "TEST" & c.address
--------------------


To add to OssieMac's approach of ending the macro (Exit Sub)...
You could build a range of the cells matching the criteria (w/o using
message boxes) & then loop through each of the resulting cells in a
userform (possibly showing a current value, new value, ignore this one
or next, and a Cancel option to completely stop the process. Tushar
shows an example of creating a range using Union which you may be able
to adapt.

Code:
--------------------
http://www.tushar-mehta.com/excel/tips/findall.html
--------------------



hth
Rob


--
broro183

Rob Brockett. Always learning & the best way to learn is to
experience...
------------------------------------------------------------------------
broro183's Profile: http://www.thecodecage.com/forumz/member.php?userid=333
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=112296