Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default Superscript a character in a string

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)

--
Cheers,
Ryan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Superscript a character in a string

Give this a try:

Sub dural()
Dim s As String
s = "100" & Chr(176) & " longitude"
MsgBox (s)
End Sub
--
Gary''s Student - gsnu200819


"RyanH" wrote:

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)

--
Cheers,
Ryan

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default Superscript a character in a string

Perfect!
--
Cheers,
Ryan


"Gary''s Student" wrote:

Give this a try:

Sub dural()
Dim s As String
s = "100" & Chr(176) & " longitude"
MsgBox (s)
End Sub
--
Gary''s Student - gsnu200819


"RyanH" wrote:

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)

--
Cheers,
Ryan

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Superscript a character in a string

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


"RyanH" wrote in message
...
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)

--
Cheers,
Ryan



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
Stepping through each character in a character string Barb Reinhardt Excel Programming 3 June 6th 07 06:23 PM
Excel-Match 1st text character in a string to a known character? bushlite Excel Worksheet Functions 2 January 15th 07 06:36 PM
superscript in part of a string when using concatenate Ged2 Excel Discussion (Misc queries) 1 August 23rd 05 02:47 PM
Function to return Character Position of Xth character within a string Andibevan[_2_] Excel Programming 4 June 9th 05 03:24 PM
Finding a particular character in a string using VBA [email protected] Excel Programming 2 September 14th 04 05:55 AM


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