Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
inputbox
How would I get an inputbox variable to be returned as a
date? I want the user to input a date...the date is then compared with a list of other dates until the program finds a date greater than the one entered. The inputbox returns a string so it won't compare the variable with the list of dates. Is there a way to convert a string to a date? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
inputbox
More details on YOUR string
-- Don Guillett SalesAid Software "defj" wrote in message ... How would I get an inputbox variable to be returned as a date? I want the user to input a date...the date is then compared with a list of other dates until the program finds a date greater than the one entered. The inputbox returns a string so it won't compare the variable with the list of dates. Is there a way to convert a string to a date? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
inputbox
y = inputbox("enter date","Date")
x=1 do until y < worksheets("").cells(x,2) list of dates x=x+1 loop the error I'm getting is that x is "overflowed" (because it doesn't find a date greater than the one entered) Though when I look at the list, there are dates greater than the one entered. -----Original Message----- More details on YOUR string -- Don Guillett SalesAid Software "defj" wrote in message ... How would I get an inputbox variable to be returned as a date? I want the user to input a date...the date is then compared with a list of other dates until the program finds a date greater than the one entered. The inputbox returns a string so it won't compare the variable with the list of dates. Is there a way to convert a string to a date? . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
inputbox
one way:
Dim result As Variant Do result = Application.InputBox("Enter date:", Type:=2) If result = False Then Exit Sub 'User clicked Cancel Loop Until IsDate(result) result = CDate(result) In article , "defj" wrote: How would I get an inputbox variable to be returned as a date? I want the user to input a date...the date is then compared with a list of other dates until the program finds a date greater than the one entered. The inputbox returns a string so it won't compare the variable with the list of dates. Is there a way to convert a string to a date? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
inputbox
works like a charm-
thnx -----Original Message----- one way: Dim result As Variant Do result = Application.InputBox("Enter date:", Type:=2) If result = False Then Exit Sub 'User clicked Cancel Loop Until IsDate(result) result = CDate(result) In article , "defj" wrote: How would I get an inputbox variable to be returned as a date? I want the user to input a date...the date is then compared with a list of other dates until the program finds a date greater than the one entered. The inputbox returns a string so it won't compare the variable with the list of dates. Is there a way to convert a string to a date? . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
InputBox with VBA | Excel Discussion (Misc queries) | |||
InputBox | Excel Discussion (Misc queries) | |||
InputBox | Excel Discussion (Misc queries) | |||
inputbox | Excel Discussion (Misc queries) | |||
Inputbox with VBA | Excel Discussion (Misc queries) |