Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default Insert a symbol using VBA

Here is the symbol I am trying to insert: –º. Here is the properties of it:
Arial, Geometric Shapes, Character Code 25BA, Unicode(hex).

When ever I use this code the line below shades red, why?

ActiveCell.Value = ChrW(25BA)

--
Cheers,
Ryan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Insert a symbol using VBA

Argument needs decimal, not hex:

Sub dural()
ActiveCell.Value = ChrW(9658)
End Sub

--
Gary''s Student - gsnu200804


"RyanH" wrote:

Here is the symbol I am trying to insert: –º. Here is the properties of it:
Arial, Geometric Shapes, Character Code 25BA, Unicode(hex).

When ever I use this code the line below shades red, why?

ActiveCell.Value = ChrW(25BA)

--
Cheers,
Ryan

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default Insert a symbol using VBA

Hi,

You need to let it know it's a hex value

ActiveCell.Value = ChrW(&H25BA)

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"RyanH" wrote in message
...
Here is the symbol I am trying to insert: –º. Here is the properties of
it:
Arial, Geometric Shapes, Character Code 25BA, Unicode(hex).

When ever I use this code the line below shades red, why?

ActiveCell.Value = ChrW(25BA)

--
Cheers,
Ryan


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default Insert a symbol using VBA

How did you know that 25BA = 9658?
--
Cheers,
Ryan


"Gary''s Student" wrote:

Argument needs decimal, not hex:

Sub dural()
ActiveCell.Value = ChrW(9658)
End Sub

--
Gary''s Student - gsnu200804


"RyanH" wrote:

Here is the symbol I am trying to insert: –º. Here is the properties of it:
Arial, Geometric Shapes, Character Code 25BA, Unicode(hex).

When ever I use this code the line below shades red, why?

ActiveCell.Value = ChrW(25BA)

--
Cheers,
Ryan

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Insert a symbol using VBA

I put 25BA in cell A1 and in cell A2:
=HEX2DEC(A1)
--
Gary''s Student - gsnu200804


"RyanH" wrote:

How did you know that 25BA = 9658?
--
Cheers,
Ryan


"Gary''s Student" wrote:

Argument needs decimal, not hex:

Sub dural()
ActiveCell.Value = ChrW(9658)
End Sub

--
Gary''s Student - gsnu200804


"RyanH" wrote:

Here is the symbol I am trying to insert: –º. Here is the properties of it:
Arial, Geometric Shapes, Character Code 25BA, Unicode(hex).

When ever I use this code the line below shades red, why?

ActiveCell.Value = ChrW(25BA)

--
Cheers,
Ryan



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Insert a symbol using VBA

Simplest way is just to memorise all the 65k character codes in Hex format,
but you could cheat and embrace with &Hxxxx&

Regards,
Peter T

"RyanH" wrote in message
...
How did you know that 25BA = 9658?
--
Cheers,
Ryan


"Gary''s Student" wrote:

Argument needs decimal, not hex:

Sub dural()
ActiveCell.Value = ChrW(9658)
End Sub

--
Gary''s Student - gsnu200804


"RyanH" wrote:

Here is the symbol I am trying to insert: ?. Here is the properties of
it:
Arial, Geometric Shapes, Character Code 25BA, Unicode(hex).

When ever I use this code the line below shades red, why?

ActiveCell.Value = ChrW(25BA)

--
Cheers,
Ryan



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Insert a symbol using VBA

How did you know that 25BA = 9658?

In the Immediate Window of VBA....

?&H25BA


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)




"RyanH" wrote in message
...
How did you know that 25BA = 9658?
--
Cheers,
Ryan


"Gary''s Student" wrote:

Argument needs decimal, not hex:

Sub dural()
ActiveCell.Value = ChrW(9658)
End Sub

--
Gary''s Student - gsnu200804


"RyanH" wrote:

Here is the symbol I am trying to insert: –º. Here is the properties of
it:
Arial, Geometric Shapes, Character Code 25BA, Unicode(hex).

When ever I use this code the line below shades red, why?

ActiveCell.Value = ChrW(25BA)

--
Cheers,
Ryan


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
Type a symbol useing shortcut keys rather the insert a symbol RJD Excel Discussion (Misc queries) 2 December 23rd 09 06:28 PM
Insert Symbol in VBA Gary''s Student Excel Programming 3 January 21st 08 04:33 PM
Insert symbol Frank E Excel Discussion (Misc queries) 3 June 23rd 06 02:47 PM
insert a therefore symbol Zandonal New Users to Excel 1 February 17th 06 01:53 AM
I need a symbol but "symbol" in the Insert menu is grayed-out. Nothappy Excel Discussion (Misc queries) 2 May 3rd 05 12:16 AM


All times are GMT +1. The time now is 03:06 PM.

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

About Us

"It's about Microsoft Excel"