How to obtain superscript and mixed font info when read from Excel?

  • Thread starter Thread starter gdu
  • Start date Start date
G

gdu

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.
 
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
 
Back
Top