corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » Microsoft Excel (VBA)


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Microsoft Excel (VBA)
Jez_B
Member

Registered: 8th Nov 06
Location: Towcester, Northants
User status: Offline
17th Feb 10 at 12:56   View User's Profile U2U Member Reply With Quote

Hello,

Does anyone know how to validate a date using Visual Basic code, for example the month can only be 1 - 12, the year must be greater than today's, and the separator must be a "/".

Thanks Jez.

ps: the date is a user entered expiry date.
Baskey
Member

Registered: 31st May 06
User status: Offline
18th Feb 10 at 12:52   View User's Profile U2U Member Reply With Quote

Im on an iphone mate so cant nip into excel to have a look at some vba for you, however if you are wanting users to use a constant date format can you not just restrict the cells to that format using data validation?

[Edited on 18-02-2010 by Baskey]
pow
Premium Member

Avatar

Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
18th Feb 10 at 16:17   View Garage View User's Profile U2U Member Reply With Quote

Data Validation
Jez_B
Member

Registered: 8th Nov 06
Location: Towcester, Northants
User status: Offline
19th Feb 10 at 14:37   View User's Profile U2U Member Reply With Quote

Cheers for the help lads, but unfortunately it had to be formatted using VBA code aswell as data validation, as data validation can be overwritten if a macro is used to populate the data.

No worries.

Jez

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
Help needed again ...Trotty can you help Red_Corsa Geek Day 17 1654
21st Mar 03 at 00:15
by Red_Corsa
 
Programming Question Mav 3000 Geek Day 4 1171
31st Mar 04 at 19:08
by Mav 3000
 
is there a program that...... chris_uk Geek Day 6 1875
16th Jun 05 at 00:47
by Dan B
 
Visual Basic stubs Geek Day 3 721
24th Oct 06 at 10:12
by James
 
Anybody a bit of a geek in Excel and bored at work? A2H GO Geek Day 8 767
13th Aug 09 at 20:30
by Dom
 

Corsa Sport » Message Board » Off Day » Geek Day » Microsoft Excel (VBA) 29 database queries in 0.0091958 seconds