![]() |
|
#1
|
|||
|
|||
![]() I'm exporting the data to a text file so certain characters cannot be used: / \ : * ? " < > | How can I prevent users from entering those characters? Thank you! |
#2
|
||||
|
||||
![]()
Hi Joe,
You could prevent the invalid characters being typed into the ActiveX control by adding the following sub to it: Code:
Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) Select Case KeyAscii 'Prevent input of: / \ : * ? " < > | Case 47, 92, 58, 42, 63, 34, 60, 62, 124 Beep KeyAscii = 0 Case Else End Select End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Paul, once again, thank you so much!
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
The modification is not allowed because selection is locked | aligahk06 | Word | 0 | 09-06-2010 06:28 AM |
Powerpoint and Activex | kartlee | PowerPoint | 0 | 09-02-2010 06:48 AM |
Junk characters (box-like characters) in Word file | Sashikala | Word | 1 | 04-20-2010 02:03 PM |
Trick to restrict opening excel/word ?? | 9morebusy | Excel | 0 | 11-12-2008 04:18 AM |
ActiveX | Cquinn | Outlook | 0 | 02-08-2006 06:22 PM |