ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Input Mask (https://www.excelbanter.com/excel-programming/284134-input-mask.html)

Mark Harrison

Input Mask
 
Hi

Is there anyway to create an input mask or format check in Excel using VBA?
I need to validate the entry postcodes on a spreadsheet.

Mark



Tom Ogilvy

Input Mask
 
http://www.cpearson.com/excel/events.htm

see the Worksheet Change event.

--
Regards,
Tom Ogilvy

"Mark Harrison" wrote in message
...
Hi

Is there anyway to create an input mask or format check in Excel using

VBA?
I need to validate the entry postcodes on a spreadsheet.

Mark





Mark Harrison

Input Mask
 
Thank you for your help, it has given me a start, however I am still unable
to create an input mask, I need to check that the first two characters in
the cell are letters and that the next character is to be a number, and so
on, is it possible to do that?

Mark



"Tom Ogilvy" wrote in message
...
http://www.cpearson.com/excel/events.htm

see the Worksheet Change event.

--
Regards,
Tom Ogilvy

"Mark Harrison" wrote in message
...
Hi

Is there anyway to create an input mask or format check in Excel using

VBA?
I need to validate the entry postcodes on a spreadsheet.

Mark







Tom Ogilvy

Input Mask
 
Have you looked at Data=Validation and use the custom formula approach?

My previous suggestion would have used the change event (target holds a
reference to the cell triggering the event), to examine the contents of the
cell and react accordingly.

--
Regards,
Tom Ogilvy

"Mark Harrison" wrote in message
...
Thank you for your help, it has given me a start, however I am still

unable
to create an input mask, I need to check that the first two characters in
the cell are letters and that the next character is to be a number, and so
on, is it possible to do that?

Mark



"Tom Ogilvy" wrote in message
...
http://www.cpearson.com/excel/events.htm

see the Worksheet Change event.

--
Regards,
Tom Ogilvy

"Mark Harrison" wrote in message
...
Hi

Is there anyway to create an input mask or format check in Excel using

VBA?
I need to validate the entry postcodes on a spreadsheet.

Mark










All times are GMT +1. The time now is 05:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com