June 27, 2017
I have recently come across your user form deleting and inserting template. I have tried to adapt it for my needs but now I'm struggling for it to allow just two of the text boxes to allow non numeric data.
Is there any chance you could take a look and see if your able to see where I'm going wrong.
November 8, 2013
You can control everything the user does in that form.
Check our file for an example.
If you want to have a specific data format for a textbox, use a pattern like:
Private Sub Accommodation_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Dim X As String
X = Accommodation.Value
If Not X Like "###-??-###" Then
Cancel = True
The pattern "###-??-###" means that first and last 3 chars are numeric, the middle ?? can be any 2 chars. You can build your own pattern, use the * wildcard if necessary (* will allow any char, can be used like: "233*", meaning that the text should start with 233, followed by any chars)
See also an example of how to control other types of data in the second file attached.
Most Users Ever Online: 57
Currently Online: lebenya monaheng
Currently Browsing this Page:
Frans Visser: 210
mey tithveasna: 71
Anders Sehlstedt: 47
Guest Posters: 1
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea
Moderators: Genevieve Tupas