Home |
Search |
Today's Posts |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Be, I'm glad to help. Thanks for the feedback! James
"BeSmart" wrote in message ... Hi James Wow - both your postings worked beautifully and are extremely helpful for me - your help is very much appreciated. I'll now go and study your code to understand it better and learn from your smart work. -- Thank for all your help BeSmart "Zone" wrote: Be, the textbox was easier than I thought. Copy this code and paste in the userform module. It assumes your textbox is named TextBox1. If that's not right, change all the TextBox1 to the name of your textbox. Also, be sure to read my previous post! James Private Sub TextBox1_Change() Dim s As String s = Me.TextBox1 s = Replace(s, "[", ChrW(780)) s = Replace(s, "]", ChrW(768)) s = Replace(s, "<", ChrW(772)) s = Replace(s, "", ChrW(769)) s = Replace(s, "~", ChrW(776)) Me.TextBox1 = s End Sub "Zone" wrote in message ... Be, I'll see what I can do with the userform and post back. In the meantime, this will show you the ChrW characters. Open a new workbook. In cell U1, enter Font In cell U2, enter Tahoma In cell U3, enter Lead character In cell U4, enter b Insert a standard module, copy the code below and put it in there. Sub ShowChrs() Dim k As Long, j As Long, c As String Columns("a:t").ClearContents c = [u4] Cells.Font.Size = 13 For j = 1 To 21 Step 2 Columns(j).Font.Name = "Arial" Columns(j + 1).Font.Name = [u2] Next j For j = 0 To 9 For k = 1 To 200 Cells(k, 1 + (j * 2)) = k + (j * 200) Cells(k, 2 + (j * 2)) = c & ChrW(k + (j * 200)) Next k Next j Columns.ColumnWidth = 6 [a1].Select End Sub Run the routine to see the characters. I included a "lead character" with each ChrW character because some of the ChrW characters won't show unless there's a character before them. To get rid of the lead character, make cell U4 empty. You can get a different font by putting a different font name in cell U2. Make sure you spell it right or you'll get weird results. James "BeSmart" wrote in message ... Thanks James I actually included the same coding at the end of the "click" code that activates the userform- i.e. once the data appears on my worksheet it converts the characters into symbols, but I would still like the user to be able to see the symbols in the userform text box as they type if possible. In terms of my experience with userforms - I'm teaching myself so it's minimal, but I'm assuming I double click on the textbox field on the userform (to go into it's code) and enter change code in there - but I'm not sure what code I write to convert the character as it's typed in the field. -- Thank heaps for your help BeSmart |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find and replace part of a text string | Excel Discussion (Misc queries) | |||
Find and Replace in a DDE string!!! | Excel Programming | |||
Find a string between two delimeters and replace with text | Excel Programming | |||
Excel - Find & Replace text in a string | Excel Programming | |||
Excel - Find & Replace text in a string | Excel Worksheet Functions |