Solved

ASCII to Integer

Posted on 1997-12-27
4
1,183 Views
Last Modified: 2006-11-17
How can I convert a character to its ASCII value in VBA?
0
Comment
Question by:mfischer2
  • 2
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
rantanen earned 50 total points
Comment Utility
MyInteger = Asc("A")
MyInteger = Asc("Apple")

These both produce the same result - 65 - 'cause Asc function takes the charater in a string and returns it's Ascii-value.

Check the help files also for AscB and AscW functions to see if they are supported and if you sometimes ned to use them.

0
 

Author Comment

by:mfischer2
Comment Utility
Does that mean that Int will convert an integer value back to Ascii?
0
 
LVL 4

Expert Comment

by:rantanen
Comment Utility
I am not quite sure what you mean by your comment.

Asc function takes a character and returns it's ascii value.

Chr function takes an ascii code (0 - 255) and returns corresponding character.

Asc("A") -> 65
Chr(65) -> A
0
 

Author Comment

by:mfischer2
Comment Utility
I found my CD and installed the proper help finally.  Thanks!  (It is CHR)
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now