+ Reply to Thread
Results 1 to 3 of 3

How can I use CHAR() function in VB?

  1. #1
    Basil
    Guest

    How can I use CHAR() function in VB?

    Hiya,

    I want to convert a number to it's character value within a VB variable in
    Excel - this can be done using CHAR() within the worksheet - eg CHAR(66)
    results in "B".

    CHAR() doesn't seem to work in VB - does anyone know how I can do it? I need
    it to populate a variable using an integer, i, which I increase by 1 in each
    iteration of a loop.

    Thanks!

    Basil

  2. #2
    Jake Marx
    Guest

    Re: How can I use CHAR() function in VB?

    Hi Basil,

    Basil wrote:
    > I want to convert a number to it's character value within a VB
    > variable in Excel - this can be done using CHAR() within the
    > worksheet - eg CHAR(66) results in "B".
    >
    > CHAR() doesn't seem to work in VB - does anyone know how I can do it?
    > I need it to populate a variable using an integer, i, which I
    > increase by 1 in each iteration of a loop.


    The VBA equivalent of the CHAR() worksheet function is Chr().

    --
    Regards,

    Jake Marx
    MS MVP - Excel
    www.longhead.com

    [please keep replies in the newsgroup - email address unmonitored]

  3. #3
    sebastienm
    Guest

    RE: How can I use CHAR() function in VB?

    Hi,
    In vba, it is CHR( )
    --
    Regards,
    Sébastien
    <http://www.ondemandanalysis.com>


    "Basil" wrote:

    > Hiya,
    >
    > I want to convert a number to it's character value within a VB variable in
    > Excel - this can be done using CHAR() within the worksheet - eg CHAR(66)
    > results in "B".
    >
    > CHAR() doesn't seem to work in VB - does anyone know how I can do it? I need
    > it to populate a variable using an integer, i, which I increase by 1 in each
    > iteration of a loop.
    >
    > Thanks!
    >
    > Basil


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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