View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
RJH RJH is offline
external usenet poster
 
Posts: 44
Default Handling the 'Cancel' button..??

I have the following code:

Do
Msg = "Is the BILLING DATE below correct?" & Chr(10) & Chr(10) _
& "If not, Enter correct date ..."
Default = Worksheets("Sheet2").Range("N2")
BillDate = InputBox(Msg, Title, Default) ' get billing date
Worksheets("Sheet2").Range("N2") = BillDate 'Put BillDate into
Sheet2 N2

If BillDate < "" Then Exit Do
MsgBox "Please enter Billing Date", 48, Title
Loop

It works like a champ but...
How would I handle someone hitting the 'Cancel button?
At this point if 'Cancel' is pressed I get the "Please enter billing date"
msg and it loops around again.

Thanks for the help.

RJH