LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default VBA Case statement

Thanks Chip and Rick for your help! You got me thinking. I
accomplished what I was after with this:

Select Case IsDate(Cells(r, "K").Value)
Case Is < Date
MsgBox "You have not entered a valid date. Please re-
enter."
Cells(r, "K").Select
Case Else

Select Case Weekday(Cells(r, "K").Value)
Case 1, 7

MsgBox "You have entered a weekend date." _
& vbLf & "Please enter the date for Friday, or the
date for Monday!"
Cells(r, "K").Select

End Select
End Select

Again, my thanks!
Ken


 
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
Using LIKE in case statement Greg Snidow Excel Programming 7 February 19th 10 01:16 AM
Case Statement jlclyde Excel Discussion (Misc queries) 3 December 4th 08 05:04 PM
Case Of Statement hfazal Excel Programming 2 February 14th 06 08:18 PM
Case Statement Help stck2mlon Excel Programming 3 June 2nd 04 01:44 PM
Case statement smi Excel Programming 2 October 18th 03 02:20 PM


All times are GMT +1. The time now is 04:57 PM.

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

About Us

"It's about Microsoft Excel"