+ Reply to Thread
Results 1 to 5 of 5

How to get pi to appear in a message box when coded using VBA

  1. #1
    Registered User
    Join Date
    01-25-2018
    Location
    london
    MS-Off Ver
    365
    Posts
    43

    How to get pi to appear in a message box when coded using VBA

    Hello all,

    I'm really stuck on with trying to code a message box in VBA. I've got

    Sub HINT_area_of_circle()
    MsgBox " HINT: The formula to find the area of a circle is Area= Pi x Radiusē "
    End Sub

    And that all comes up fine and works, but i was wondering if there was a way to make "Pi" appear as the Pi symbol when the message box pops up? I've tried the alt code for pi but it seems that it isn't working.

    Would anyone be able to help please?

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,575

    Re: How to get pi to appear in a message box when coded using VBA

    Try ChrW(960) for π

  3. #3
    Registered User
    Join Date
    01-25-2018
    Location
    london
    MS-Off Ver
    365
    Posts
    43

    Re: How to get pi to appear in a message box when coded using VBA

    Thanks for the help, unfortunately that just returns p and not the pi symbol

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,575

    Re: How to get pi to appear in a message box when coded using VBA

    Are you on Mac?
    If so, no idea...

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,575

    Re: How to get pi to appear in a message box when coded using VBA

    Oriya,

    Sorry I forgot that msgbox doesn't support unicode characters.

    So, 2 options.
    1) Prepare a UserForm with one Label
    Please Login or Register  to view this content.
    2) or API
    Please Login or Register  to view this content.
    Last edited by jindon; 01-25-2018 at 09:45 AM.

+ 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. hard-coded vs ?
    By daulpuchich in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-02-2015, 10:19 AM
  2. [SOLVED] IF Formula ( Hard-Coded )
    By DespoExcel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-31-2014, 04:37 PM
  3. Chart coded through VBA sometimes displays itself sometimes not.
    By seigna in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-07-2013, 11:29 AM
  4. coded if statement
    By guerilla in forum Excel General
    Replies: 3
    Last Post: 12-07-2006, 06:28 AM
  5. [SOLVED] Coded Entries
    By Wayne Lewis in forum Excel General
    Replies: 1
    Last Post: 03-24-2006, 04:32 PM
  6. [SOLVED] hard coded text
    By William Benson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-06-2005, 02:05 PM
  7. [SOLVED] coded concatenating is not working
    By papa jonah in forum Excel General
    Replies: 0
    Last Post: 03-17-2005, 07: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