?
Solved

Insert Alphabets

Posted on 2003-03-21
3
Medium Priority
?
339 Views
Last Modified: 2010-05-01
how to insert alphabets A-Z and a-z only ??

0
Comment
Question by:ANGmoh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Expert Comment

by:ayufans
ID: 8185012
insert into where ?? please be more specific.
0
 
LVL 1

Expert Comment

by:ayufans
ID: 8185046
this example is inserting the text into a textbox :

Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii < 65 Or KeyAscii > 122 Then
        KeyAscii = 0
    End If
End Sub

Hope this is what you wanted.

Good Luck
0
 
LVL 3

Accepted Solution

by:
DocM earned 60 total points
ID: 8185096
Hi,
To accept A-Z or a-z only:

Private Sub Text1_KeyPress(KeyAscii As Integer)
    Select Case KeyAscii

        Case 8
            'Backspace accepted

        Case Asc("A") To Asc("Z")

        Case Asc("a") To Asc("z")

        Case Else
            'character not accepted
            KeyAscii = 0

    End Select

End Sub
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month9 days, 17 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question