Vba - restricting cell vallue

  • Thread starter Thread starter ajliaks
  • Start date Start date
A

ajliaks

Hi all,

I need to restric the vallue of a cell, to this format:
"dd-mm-yy"

and prevent user inputing like this:
"dd.mm.yy" or "dd/mm/yy"

I tried using Excel - Data - Validation, but unsuccessfully.
Is there anyway to do this with Vba?
may be something like:

Workbooks(activeworkboo.name).Worksheets(activesheet.name).Cells(x,y).Forma
= "dd-mm-yy"

But it has to PREVENT user's inputing.
Thanks in advance.
Aldo
 
Any valid date entered into a cell can then be formatted to look like
dd-mm-yy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top