+ Reply to Thread
Results 1 to 3 of 3

VBA functions with respect to Unicode characters

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    VBA functions with respect to Unicode characters

    Which VBA function is the most congruent with the Unicode set of characters.
    Unicode character link: https://unicode-table.com/en/
    Unicode identification is by U+**** where * is an alpha-numeric character.
    By congruent, I mean that the last 4 alpha-numeric characters from Unicode must equal the last 4 alpha-numeric characters of the VBA function.
    So far I am using ChrW(&H****).
    Is ChrW() the most suitable with all the variations in computing, most of which I don't really know, but one is the operating system which could be Windows/Mac/Linux.

    As an example, the symbol "@" has Unicode identification of "U+0040" and VBA equivalent is "ChrW(&H0040)". The leading 2 zeros actually drop off.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: VBA functions with respect to Unicode characters

    Hello Excel_&_Help,

    VBA by its nature is ANSI based. However, strings in Windows are all Unicode. The Windows operating system makes the conversion from Unicode to ANSI automatically for strings.

    So, to include Unicode characters in a VBA string, you can use the Character Wide (ChrW) function. Another way is to use the Windows API. This method is very low level coding and not as straightforward. Also, the API calls are only available on Windows.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    Re: VBA functions with respect to Unicode characters

    Thanks for providing this input.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Unicode Characters in formula's
    By dontaylor in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-29-2017, 09:48 AM
  2. From Characters To Unicode
    By nshadow1996 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-19-2014, 06:06 PM
  3. Best way to find/replace Unicode characters
    By greek in forum Word Programming / VBA / Macros
    Replies: 4
    Last Post: 03-17-2014, 05:39 PM
  4. Replies: 0
    Last Post: 02-07-2006, 07:35 AM
  5. show unicode characters in excel 97
    By mowali in forum Excel General
    Replies: 0
    Last Post: 03-09-2005, 01:22 PM
  6. inserting unicode characters
    By Wazooli in forum Excel General
    Replies: 1
    Last Post: 02-07-2005, 03:06 PM
  7. [SOLVED] How do I enter Unicode characters in Excel?
    By MacroAlan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-05-2005, 05:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1