Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Adding a micron symbol to text string

I'm not sure what you mean by "do this in VB without cell references". You
have to have cell references somehow so that it knows what to format.

What did you have in mind?

FYI, the convention in this newgroup is to top post. Threads get very messy
when there is top and bottom posting. I'm guessing you're using a
newsreader that defaults to bottom posting.

Barb Reinhardt

"Stopher" wrote:

On Aug 22, 12:10 pm, OssieMac
wrote:
Since viewing Barb Reinhardt's reply I now believe that I mis-interpreted
what you wanted to do. Barb's reply is the correct one.

Regards,

OssieMac



"OssieMac" wrote:
Hi Stopher,


Try this and see if it does what you want:-


Sub Font_Mix()


Dim strTest As String 'String with all characters
Dim umPosition As Single 'Position where um starts


strTest = "Testum"


'Find start position of characters um
umPosition = InStr(1, strTest, "um")


'Assign string to a cell
'NOTE: the font code below does not work with a variable
Range("A1") = strTest


'Change font on 1 character starting at position umPosition
With Range("A1").Characters(Start:=umPosition, Length:=1).Font
.Subscript = True
End With


End Sub


regards,


OssieMac


"Stopher" wrote:


Hi All,


How do i add a symbol to text string?


I have something like:


Text_String = " Text" & Variable & " um"


but what i want is the u in the um above to be the micron symbol
(.font = "Symbol") on m


I was thinking something like:


Text_String = " Text" & Variable & len("m").font = "Symbol" & "m"


or something like that, with formating the m in the text string
itself.


Any ideas?


Stopher- Hide quoted text -


- Show quoted text -


Thnx for the replies, but am really trying to do this in VB without
cell references, so having a function in a text string that will
format one or more letter to a different font.

Stopher


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
INTERMIDIATE VALUE OF A CURVE (PRECISION 1 MICRON) HARSHAWARDHAN. S .SHASTRI[_2_] Excel Worksheet Functions 13 October 13th 08 12:25 AM
Adding text string to cells Ray W. New Users to Excel 2 March 28th 08 02:33 PM
Adding Text to a String Gene Haines Excel Discussion (Misc queries) 1 November 29th 06 05:34 AM
the ' symbol ends the SQL string, how do you replace it Excel Valori Excel Programming 2 March 3rd 06 01:49 AM
isolating a string containing a % symbol bobadigilatis Excel Worksheet Functions 5 January 27th 06 11:32 PM


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