+ Reply to Thread
Results 1 to 10 of 10

Inserting Symbols via a macro

Hybrid View

  1. #1
    Registered User
    Join Date
    02-03-2006
    Posts
    3

    Inserting Symbols via a macro

    Hello,

    I need to write a macro that will insert one of the symbols into a cell via a Macro (specifically the shape called 'Black Circle', which can be found in the Arial font, in the subset Geometric Shapes).

    I have tried recording a macro and doing this to see the code, but when re-ran it only inserts a question mark.

    It displays the character code of 25CF (in unicode), is there anyway I can use this to insert the character?

    Many thanks,

    -Graham

  2. #2
    Ken Johnson
    Guest

    Re: Inserting Symbols via a macro

    Hi Graham,
    25CF converted from hexadecimal to double yields 9679.
    (2*16^3 + 5*16^2 + 12*16 + 9 = 9679)
    Range("A1").Value = ChrW(9679) resulted in a small black circle.
    Ken Johnson


  3. #3
    Registered User
    Join Date
    02-03-2006
    Posts
    3
    Hi Ken,

    Brilliant!

    You have made my day so much easier!

    Thanks,

    -Graham

  4. #4
    Ken Johnson
    Guest

    Re: Inserting Symbols via a macro

    Hi Graham,
    You're welcome, glad I could help you out. Thanks for the feedback.
    Ken Johnson


  5. #5
    Ken Johnson
    Guest

    Re: Inserting Symbols via a macro

    I know this isn't important, but I just noticed a little mistake I made
    in the working out of 25CF to 9679. The final result's correct, but the
    + 9 should have been + 15, since F = 15.
    Ken Johnson


  6. #6
    Tom Ogilvy
    Guest

    Re: Inserting Symbols via a macro

    Here is an easier way:

    ? &H25CF
    9679

    so
    d# = &H25CF
    ActiveCell.value = chrw(d)

    or

    ActiveCell.Value = chrw(&H25CF)


    --
    Regards,
    Tom Ogilvy


    "Ken Johnson" <KenCJohnson@gmail.com> wrote in message
    news:1138967516.851118.97990@f14g2000cwb.googlegroups.com...
    > I know this isn't important, but I just noticed a little mistake I made
    > in the working out of 25CF to 9679. The final result's correct, but the
    > + 9 should have been + 15, since F = 15.
    > Ken Johnson
    >




  7. #7
    Ken Johnson
    Guest

    Re: Inserting Symbols via a macro

    Hi Tom,
    Thanks for that, this is the first time I've worked with Hexadecimal.
    It's nice to get to know the little shortcuts.
    Ken Johnson


+ 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