Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA - Hex To ASCII


Group,
Is there a function in VBA that will convert hex into ascii.
Example assume I have 0x39 and I want it to convert it to ascii, or 9.
Same goes for the alpha characters as well A thru Z both lower case and
upper case.

Tony


--
ajocius
------------------------------------------------------------------------
ajocius's Profile: http://www.excelforum.com/member.php...o&userid=17695
View this thread: http://www.excelforum.com/showthread...hreadid=544141

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA - Hex To ASCII


Excel provides the Char(value) function, where value is the decima
representation of the ASCII character. The function returns the ASCI
character represented by the number.

Note that before using this function, your code will have to conver
the hexadecimal value to decimal first

--
C01
-----------------------------------------------------------------------
C01d's Profile: http://www.excelforum.com/member.php...fo&userid=3442
View this thread: http://www.excelforum.com/showthread.php?threadid=54414

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default VBA - Hex To ASCII

Try:

Chr(Clng("&H" &yourHEXstring))


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default VBA - Hex To ASCII

? chr(&H39)
9

--
Regards,
Tom Ogilvy


"ajocius" wrote:


Group,
Is there a function in VBA that will convert hex into ascii.
Example assume I have 0x39 and I want it to convert it to ascii, or 9.
Same goes for the alpha characters as well A thru Z both lower case and
upper case.

Tony


--
ajocius
------------------------------------------------------------------------
ajocius's Profile: http://www.excelforum.com/member.php...o&userid=17695
View this thread: http://www.excelforum.com/showthread...hreadid=544141


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSV to ASCII Quco Excel Discussion (Misc queries) 5 April 4th 23 10:30 AM
ASCII format jimbob Excel Discussion (Misc queries) 1 March 18th 06 01:24 PM
Converting hex to ascii Tom Excel Programming 4 April 6th 04 06:44 PM
Ascii Syrus the Virus[_11_] Excel Programming 4 February 3rd 04 02:59 PM
ASCII value Terence Excel Programming 2 October 2nd 03 03:41 AM


All times are GMT +1. The time now is 06:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"