Set fomula="66 + 0.3 * 6.6 + 162.1 +/- 0.5 * 0.1"
L=Len (" 66 + 0.3 * 6.6 + 162.1 +/- 0.5 * 0.1 ")
'in the contents of the selected cycle, as long as it is the subscript, delete
For t=1 To l
If fomula. Characters (t). The Font. Superscript=True Then
Fomula. Characters (t). The Delete
End the If
Next t
T=0
L=0
"66 + 0.3 * 6.6 + 162.1 +/- 0.5 * 0.1" all have positive and negative value in this digital is superscript
Operation result was 162.1 +/- 0.5 * 66 +/- 0.3 * 6.6, which is only the final figures of Superscript, in front of the two Numbers on the label is not clear, on the run to the front of the two Numbers and fomula. Characters (t). The Font. Superscript=null, not jump into the if deleting Superscript, what reason is this
CodePudding user response:
A) superscript is set in the font, has nothing to do with character itself, probably two - there is no set as superscript,B) there is an error code, called a Delete, the character will be moved forward, behind the loop length will be crossing the line, continuous superscript characters will be skipped, switch to the cycle of from right to left,