Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Need a function that takes an alpha-numeric character (i.e. A or B or C or # or &) and returns the Chr() value

Posted on 2005-03-16
4
Medium Priority
?
166 Views
Last Modified: 2010-05-02
I need a simple function like this:

Public Function GetChrValue(SingleCharacter as string) as Long

             Dim Char as string, CharLong as Long

             Char = Left(SingleCharacter, 1)     ' For those people who don't understand the word "Single"

             CharLong = '[ HERE'S WHAT I NEED ]

             GetChrValue = CharLong

End Function

           



0
Comment
Question by:timothyspriggs
  • 2
4 Comments
 
LVL 97

Expert Comment

by:Lee W, MVP
ID: 13553286
Sorry, I'm a bit confused...  You need the function you posted...?
0
 
LVL 10

Accepted Solution

by:
ADSaunders earned 2000 total points
ID: 13553298
You need the ASCII value of the character as a long??
CharLong = clng(ASC(Char))

.. Alan
0
 
LVL 1

Author Comment

by:timothyspriggs
ID: 13553507
Ahhh.... Alan gets it. Thanks.
0
 
LVL 1

Author Comment

by:timothyspriggs
ID: 13553519
Leew, read the function... see where it says [ HERE'S WHAT I NEED ]? That's what I needed.

I know it was simple, but I just had a brain fart and couldn't remember how to do it -- like forgetting a girls name -- haha.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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 process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month15 days, 4 hours left to enroll

577 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