+ Reply to Thread
Results 1 to 5 of 5

Special keystrokes in a Macro

Hybrid View

  1. #1
    Eric
    Guest

    Special keystrokes in a Macro

    When ALT + 0176 is pressed you get the degree symbol. Likewise you get the
    sigma character when you press ALT + 997. I would like to incorporate these
    type of keystrokes into a macro. Is it possible, and if so, how? Thank you
    in advance for your time and effort.

    Eric Pearce



  2. #2
    papou
    Guest

    Re: Special keystrokes in a Macro

    Hello Eric
    Look for Chr() function in VBA help.

    HTH

    Cordially
    Pascal

    "Eric" <elpearce_school@hotmail.com> a écrit dans le message de news:
    uaNu94uWFHA.1384@TK2MSFTNGP09.phx.gbl...
    > When ALT + 0176 is pressed you get the degree symbol. Likewise you get
    > the
    > sigma character when you press ALT + 997. I would like to incorporate
    > these
    > type of keystrokes into a macro. Is it possible, and if so, how? Thank
    > you
    > in advance for your time and effort.
    >
    > Eric Pearce
    >
    >




  3. #3
    Eric
    Guest

    Re: Special keystrokes in a Macro

    That works for ASCII characters, but I need to access unicode characters as
    obtained by use the keystrokes like ALT+0176 = 'degree symbol', and ALT+997
    = 'sigma', etc... Chr() errors at anything above 255. Is there another
    way?


    "papou" <cestpasbon@çanonplus44.fr> wrote in message
    news:%23glnAMvWFHA.160@TK2MSFTNGP15.phx.gbl...
    > Hello Eric
    > Look for Chr() function in VBA help.
    >
    > HTH
    >
    > Cordially
    > Pascal
    >
    > "Eric" <elpearce_school@hotmail.com> a écrit dans le message de news:
    > uaNu94uWFHA.1384@TK2MSFTNGP09.phx.gbl...
    > > When ALT + 0176 is pressed you get the degree symbol. Likewise you get
    > > the
    > > sigma character when you press ALT + 997. I would like to incorporate
    > > these
    > > type of keystrokes into a macro. Is it possible, and if so, how? Thank
    > > you
    > > in advance for your time and effort.
    > >
    > > Eric Pearce
    > >
    > >

    >
    >




  4. #4
    Gord Dibben
    Guest

    Re: Special keystrokes in a Macro

    Eric

    Example code using Chr

    Sub sq_Meters()
    Selection.NumberFormat = "0"" m" & Chr(178) & """"
    '0179 for cubic meters
    End Sub


    Gord Dibben Excel MVP

    On Tue, 17 May 2005 08:39:31 -0600, "Eric" <elpearce_school@hotmail.com>
    wrote:

    >When ALT + 0176 is pressed you get the degree symbol. Likewise you get the
    >sigma character when you press ALT + 997. I would like to incorporate these
    >type of keystrokes into a macro. Is it possible, and if so, how? Thank you
    >in advance for your time and effort.
    >
    >Eric Pearce
    >



  5. #5
    Eric
    Guest

    Re: Special keystrokes in a Macro

    Apparently I am not explaining myself very well. If I were to press and
    hold the ALT key and while holding down the ALT key were to press the number
    sequence 997 then release the ALT key the greek symbol sigma will apear in
    the current font. However, the Chr() function doesn't recognize anything
    above 255. Therefore, I can't access any of the greek symbols which reside
    in the numbers above 255. I really do understand the Chr() function and it
    will not work for what I am trying to do. I really do appreciate the
    suggestions to date, but they don't work. Is there anyone out there that
    can help? Thanks in again, and in advance.

    Eric


    "Gord Dibben" <gorddibbATshawDOTca> wrote in message
    news:sp5k81dmbqkgrnhijsvh796f6kq9b6tgk4@4ax.com...
    > Eric
    >
    > Example code using Chr
    >
    > Sub sq_Meters()
    > Selection.NumberFormat = "0"" m" & Chr(178) & """"
    > '0179 for cubic meters
    > End Sub
    >
    >
    > Gord Dibben Excel MVP
    >
    > On Tue, 17 May 2005 08:39:31 -0600, "Eric" <elpearce_school@hotmail.com>
    > wrote:
    >
    > >When ALT + 0176 is pressed you get the degree symbol. Likewise you get

    the
    > >sigma character when you press ALT + 997. I would like to incorporate

    these
    > >type of keystrokes into a macro. Is it possible, and if so, how? Thank

    you
    > >in advance for your time and effort.
    > >
    > >Eric Pearce
    > >

    >




+ 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