LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Michael Link
 
Posts: n/a
Default Data Validation & Macros

Geez--this is my second post of the morning. Sorry about not thinking my =

queries through all the way!

Anyway, I have the following macro which deposits the date and time into =
a=20
cell:

Sub DateAndTime()
With ActiveCell
.Value =3D Now
.NumberFormat =3D "mm/dd/yy h:mm AM/PM"
End With
End Sub

Unfortunately, the stamp deposited into the cell seems not to be =
recognized=20
by Data Validation, which is set up to flash a warning box if the time =
entered=20
is after 5:00 PM. If I enter the identical info that the macro generates =

manually and hit "Enter," THEN Validation pops the warning box up.

What am I doing wrong? Can I rewrite the macro so that it essentially =
hits=20
"Enter" at the end so that validation will work?

Thanks!
 
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
Effect of Conditional Formatting, Data Validation Bill Sturdevant Excel Discussion (Misc queries) 1 January 25th 05 11:50 PM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM
Data Validation Window? Ken Excel Discussion (Misc queries) 1 January 11th 05 10:48 PM
Using Validation List from Another Workbook with Dependent Data Mike R. Excel Worksheet Functions 5 January 8th 05 07:06 PM
Excel2K: Is it possible to use dynamic named ranges in custom data validation formula? Arvi Laanemets Excel Discussion (Misc queries) 0 December 2nd 04 11:29 AM


All times are GMT +1. The time now is 04:20 AM.

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"