Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Alow certain Date Range

Here is a hard one i have been stuckon for a while. I have a user form that
does a now statemnet to automatically fill a text box. However a user can
input a another date in the date issued textbox. What i want it to do is if
that date that the user enters in is to old then it iwll pop a msgbox up.

For example this being October can you have the date limit allow input for
August, September and October and flag any with dates before August as too
old to accept? Now this will have to be an xpression that will update from
the now statement. So if its now month is November then it will allow info
for November, October and September but flag any past dates. I know this is a
wierd one but i thought i was getting good at programming till this happend.
Thanks for anyone hlp on this.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 380
Default Alow certain Date Range

If CDate(txtDateIssued.Text) = DateSerial(Year(Date),Month(Date)-2,1)
And
CDate(txtDateIssued.Text) <= DateSerial(Year(Date),Month(Date)+1,0)
Then
Msgbox "Valid"
Else
Msgbox "Invalid"
End If

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"mikester104" <u28159@uwe wrote in message news:681bc82a08e30@uwe...
Here is a hard one i have been stuckon for a while. I have a user form

that
does a now statemnet to automatically fill a text box. However a user can
input a another date in the date issued textbox. What i want it to do is

if
that date that the user enters in is to old then it iwll pop a msgbox up.

For example this being October can you have the date limit allow input for
August, September and October and flag any with dates before August as too
old to accept? Now this will have to be an xpression that will update from
the now statement. So if its now month is November then it will allow info
for November, October and September but flag any past dates. I know this

is a
wierd one but i thought i was getting good at programming till this

happend.
Thanks for anyone hlp on this.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Alow certain Date Range

See your other post.

mikester104 wrote:

Here is a hard one i have been stuckon for a while. I have a user form that
does a now statemnet to automatically fill a text box. However a user can
input a another date in the date issued textbox. What i want it to do is if
that date that the user enters in is to old then it iwll pop a msgbox up.

For example this being October can you have the date limit allow input for
August, September and October and flag any with dates before August as too
old to accept? Now this will have to be an xpression that will update from
the now statement. So if its now month is November then it will allow info
for November, October and September but flag any past dates. I know this is a
wierd one but i thought i was getting good at programming till this happend.
Thanks for anyone hlp on this.


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a formula in a date range to locate a specific date - ecel util Excel Discussion (Misc queries) 0 February 19th 07 03:03 PM
copy date based on date -refer to date range mindpeace[_4_] Excel Programming 1 June 3rd 06 01:30 PM
Formula for determining if two date columns fall within specific date range Igottabeme Excel Worksheet Functions 2 April 21st 06 02:50 AM
Formula for determining if two date columns fall within specific date range Igottabeme Excel Discussion (Misc queries) 1 April 20th 06 10:03 PM
How to count dates within a certain range in a column with mutiple date range entries Krisjhn Excel Worksheet Functions 2 September 1st 05 01:59 PM


All times are GMT +1. The time now is 01:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"