Superscript a character in a string

R

RyanH

Is there a way to superscript a character is a string. I want this string to
be entered into a textbox. For example,

This is what I have:
tbxViewingAngle = "140 Degrees Horizontal"

This is what I want:
tbxViewingAngle = "140o Horizontal" (Superscript the "o" in the string)
 
G

Gary''s Student

Give this a try:

Sub dural()
Dim s As String
s = "100" & Chr(176) & " longitude"
MsgBox (s)
End Sub
 
B

Bernie Deitrick

Ryan,

You cannot superscript a character in a textbox, but you can use the degree character:

tbxViewingAngle.Text = "140" & Chr(176) & " Horizontal"

HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top