Hello,

I wonder if anyone can help me please ?

I have an inputbox which is used to enter a date, then do stuff based on the date chosen.

The application automatically populates the input box for the user, and they can then change it if required.

My code is :
Code:
Dim DateFrom As String = String.Empty
DateFrom = InputBox("Please Enter the Date you wish to Export From", "Date From", "01/" & Month(CalendarView1.CalendarDate) & "/" & Year(CalendarView1.CalendarDate))
However I get a problem if someone presses cancel in as much as it still tries to run the routine based on the date the box was defaulted to.

How can I capture that they have pressed cancel and cancel the operation accordingly ?