Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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


--
GRussell31
------------------------------------------------------------------------
GRussell31's Profile: http://www.excelforum.com/member.php...o&userid=31138
View this thread: http://www.excelforum.com/showthread...hreadid=507999

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Inserting Symbols via a macro


Hi Ken,

Brilliant!

You have made my day so much easier!

Thanks,

-Graham


--
GRussell31
------------------------------------------------------------------------
GRussell31's Profile: http://www.excelforum.com/member.php...o&userid=31138
View this thread: http://www.excelforum.com/showthread...hreadid=507999

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default Inserting Symbols via a macro

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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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" wrote in message
ups.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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default 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

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Inserting Symbols via a macro

Okay, I don't understand how either of you converted that unicode number.
I'd like to convert code 221A to get the checkmark symbol. I'm sure you
could tell me the value, but I'd also like to understand that "easier way"
that Tom mentioned. Where exactly to I enter "? &H221A" to get the result?
Thanks so much!

"Ken Johnson" wrote:

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


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Inserting Symbols via a macro


Dorci,

To obtain the value enter the macro designer in Excel.
The bring up the immediate window (CTRL + G). You will then be able t
type '? &221a' into the immediate pane and it will return 145.

Hope that helps,

-Graha

--
GRussell3
-----------------------------------------------------------------------
GRussell31's Profile: http://www.excelforum.com/member.php...fo&userid=3113
View this thread: http://www.excelforum.com/showthread.php?threadid=50799

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Inserting Symbols via a macro

Thanks for the tip on the "Immediate" window. I never knew about that.

"GRussell31" wrote:


Dorci,

To obtain the value enter the macro designer in Excel.
The bring up the immediate window (CTRL + G). You will then be able to
type '? &221a' into the immediate pane and it will return 145.

Hope that helps,

-Graham


--
GRussell31
------------------------------------------------------------------------
GRussell31's Profile: http://www.excelforum.com/member.php...o&userid=31138
View this thread: http://www.excelforum.com/showthread...hreadid=507999


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Symbols on the keyboard are not the symbols on the screen.... Lisha Excel Discussion (Misc queries) 2 May 22nd 10 07:29 AM
Inserting Symbols with IF Function. GEM Excel Discussion (Misc queries) 5 July 24th 09 03:55 PM
inserting symbols not available in excel milkha jauhal Excel Discussion (Misc queries) 1 February 24th 06 07:14 AM
Inserting Symbols msb Excel Discussion (Misc queries) 1 August 23rd 05 01:34 PM
Inserting greek symbols in the legend ? Lukas Barchewitz Charts and Charting in Excel 1 June 23rd 05 03:30 PM


All times are GMT +1. The time now is 07:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"