Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default From VB6 how to determine if an Excel cell string containssuperscript?

I am reading contents of an Excel file from a VB6 program. How do I
know if a string from a cell contains superscript or different fonts
(such as Greek letters)? Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default From VB6 how to determine if an Excel cell string contains superscript?


Superscript and Name are properties of the cell font.
Superscript returns True or False and Name returns the Font Name...
MsgBox Range("B6").Font.Superscript & vbCr & Range("B6").Font.Name

Note: "Name" has various uses in Excel. It can be an object or a string.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




wrote in message
I am reading contents of an Excel file from a VB6 program. How do I
know if a string from a cell contains superscript or different fonts
(such as Greek letters)? Thanks.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default From VB6 how to determine if an Excel cell string contains superscript?

In general, the entire contents of a cell would not be super/subscripted,
and it's likely other formatting may be applied on individual characters. In
such case, you need to test each character:

?activesheet.range("B1").Characters(2,1).font.supe rscript

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Jim Cone" wrote in message
...

Superscript and Name are properties of the cell font.
Superscript returns True or False and Name returns the Font Name...
MsgBox Range("B6").Font.Superscript & vbCr & Range("B6").Font.Name

Note: "Name" has various uses in Excel. It can be an object or a string.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




wrote in message
I am reading contents of an Excel file from a VB6 program. How do I
know if a string from a cell contains superscript or different fonts
(such as Greek letters)? Thanks.



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
Determine which values are = 0 & create string [email protected] Excel Discussion (Misc queries) 2 December 18th 08 04:07 PM
Determine data type in a string news.epix.net Excel Programming 5 October 31st 07 01:56 PM
determine wheter string has a number in it? Ted Metro Excel Worksheet Functions 5 June 2nd 07 04:18 AM
Determine number format of excel cell James Bond[_2_] Excel Programming 1 October 10th 06 06:02 AM
Determine if any Cell in Range Equals a String Connie Excel Programming 3 October 10th 06 04:31 AM


All times are GMT +1. The time now is 06:31 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"