怎麼讓輸入的某些字串只能出現一次不能重複呢?
EX:字母A在INPUT進欄位時只能出現一次
2006-10-04 13:26:39 · 1 個解答 · 發問者 TOMATO 1 in 電腦與網際網路 ➔ 程式設計
'Ex:假設A只能輸入1次(不分大小寫)Private Sub Text1_KeyPress(KeyAscii As Integer) Dim S As String S = "A" If UCase(Chr(KeyAscii)) = S Then If InStr(1, Text1, S, vbTextCompare) Then KeyAscii = 0 End IfEnd Sub
2006-10-04 14:07:32 · answer #1 · answered by W.J.S. 7 · 0⤊ 0⤋