Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How to obtain superscript and mixed font info when read from Excel?

I am reading contents of an Excel file from a VB6 program. I need find
out the superscript and mixed font format info of each cell (such as
"Current Gain (A/cm2)", "Sheet Resistance (W/sq)", that 2 is
superscript and W is Omega in Symbol font). When I use, for example,
Range(strRange).Font.Superscript or Range(strRange).Font.Name, it
returns Null.

Any help will be greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default How to obtain superscript and mixed font info when read from Excel?

It's always best to read any Font properties to a Variant as it can accept a
Null in case of mixed formats. Eg

v = cell.font.superscript
If IsNull(v) then ' must be mixed
redim arr(1 to len(cell)) ' could be As boolean for Superscript
for i = 1 to len(cell)
arr(i) = cell.characters(i,1).superscript
etc

Regards,
Peter T

wrote in message
...
I am reading contents of an Excel file from a VB6 program. I need find
out the superscript and mixed font format info of each cell (such as
"Current Gain (A/cm2)", "Sheet Resistance (W/sq)", that 2 is
superscript and W is Omega in Symbol font). When I use, for example,
Range(strRange).Font.Superscript or Range(strRange).Font.Name, it
returns Null.

Any help will be greatly appreciated.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default How to obtain superscript and mixed font info when read from Excel?

Don't forget to read the responses to yesterday's post.

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


wrote in message
...
I am reading contents of an Excel file from a VB6 program. I need find
out the superscript and mixed font format info of each cell (such as
"Current Gain (A/cm2)", "Sheet Resistance (W/sq)", that 2 is
superscript and W is Omega in Symbol font). When I use, for example,
Range(strRange).Font.Superscript or Range(strRange).Font.Name, it
returns Null.

Any help will be greatly appreciated.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How to obtain superscript and mixed font info when read fromExcel?

Thanks, Peter and Jon.
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
How do I add subscript/superscript font to the Excel toolbar?? Maegen Excel Discussion (Misc queries) 1 March 13th 07 02:31 AM
Obtain Word Doc Info Into Excel WayneK[_6_] Excel Programming 0 July 19th 05 05:39 PM
How can i change the font in Legend box in excel to superscript, n Mohammad Charts and Charting in Excel 1 April 24th 05 03:22 AM
How can i change the font in Legend box in excel to superscript, n bj Charts and Charting in Excel 0 April 21st 05 05:41 PM
Multiple font styles (superscript and subscript, for example) Lorraine Charts and Charting in Excel 0 January 13th 05 07:45 PM


All times are GMT +1. The time now is 01:46 PM.

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"