|
-
Jan 18th, 2008, 05:38 AM
#1
Thread Starter
Hyperactive Member
[2005] Input Box Help Please
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 ?
-
Jan 18th, 2008, 05:48 AM
#2
Re: [2005] Input Box Help Please
The inputbox returns an empty string if the user presses cancel.
Altough, I would strongly encourage you to create a form that mimics the inputbox functionallity, as that will defenitly provide more functionallity.
-
Jan 18th, 2008, 07:57 AM
#3
Thread Starter
Hyperactive Member
Re: [2005] Input Box Help Please
Thanks Athiest - I must admit I did toy with the idea of creating a form for the purpose.
I think that's what I'll do.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|