Thread: if - loop?
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
stefan via OfficeKB.com stefan via OfficeKB.com is offline
external usenet poster
 
Posts: 18
Default if - loop?


Hi,
If the user input the wrong info, a msg will pop up. How can i prevent the
macro from running through the rest, but instead loop back until the user
inputs the correct info?
Thanks,
Stefan

....
....
If [ccard2].Formula Like "#" Then ' 1
MsgBox "Please enter 5 digits." & Chr(10) _
& "I.e. '04' for month, '/' for the divider and '05' for the year." &
Chr(10) _
& "This would look like 04/05." _
& Chr(10) & Chr(10) & "Thank you.", vbInformation, "Incorrect Entry
Notice"
Range("ccard2").Select
End If
MsgBox "Thank you."
....
....


--
Message posted via http://www.officekb.com