Add two type mix font in one cell in excel 2003 [Solved/Closed]

aptpsbwmraj 9 Posts Sunday July 14, 2013Registration date August 21, 2015 Last seen - Jul 21, 2013 at 01:13 PM - Latest reply: aptpsbwmraj 9 Posts Sunday July 14, 2013Registration date August 21, 2015 Last seen
- Aug 17, 2013 at 10:00 AM
hallo
i have a excel 2003 userform with textbox . I have problem in my data base . I have 2 type font in my data like DevLys 010 and arial. I want to type both font in textbox at same time and get it in sheets cell A41 . I try but I cant make it . I m new in excel vba could some one plese make it possible for me. thanks in advance. PLEASE HELP. THANKS
See more 

9 replies

Best answer
TrowaD 2391 Posts Sunday September 12, 2010Registration dateContributorStatus July 12, 2018 Last seen - Jul 29, 2013 at 10:40 AM
3
Thank you
Sure thing.

Here you go:
Private Sub CommandButton1_Click()
Dim x, y, z As Integer

Range("A41").Font.Name = "Agency FB"
x = Len(TextBox1)
y = Len(TextBox1) + Len(TextBox2)
z = Len(TextBox3)
Range("A41") = TextBox1 & TextBox2 & TextBox3 & TextBox4
Range("A41").Characters(1, x).Font.Name = "Arial"
Range("A41").Characters(y, z).Font.Name = "Arial"

Unload UserForm1
End Sub

Best regards,
Trowa

Thank you, TrowaD 3

Something to say? Add comment

CCM has helped 1705 users this month

aptpsbwmraj 9 Posts Sunday July 14, 2013Registration date August 21, 2015 Last seen - Aug 17, 2013 at 10:00 AM
Thanks Friend
TrowaD 2391 Posts Sunday September 12, 2010Registration dateContributorStatus July 12, 2018 Last seen - Jul 23, 2013 at 12:03 PM
0
Thank you
Hi,

Not sure if I can solve this one. What could make it easier is if there are patterns to what you enter in the textbox.
Like:
Only 2 words are entered.
Specific lengths of words.
First or second word can only be a certain word.
...
etc..

Best regards,
Trowa
aptpsbwmraj 9 Posts Sunday July 14, 2013Registration date August 21, 2015 Last seen - Jul 23, 2013 at 02:47 PM
thanks TrowaD for reply
we have lots of letters in office and my work is type them in excel. in these letter they (clients)have use english word any where not in a specific position :( this is my problem. when I type these letter we have a particular formate in excel sheet and letter are type in sheets cell A41. I can make user form for all details of formate but this problem cant solve . please help
aptpsbwmraj 9 Posts Sunday July 14, 2013Registration date August 21, 2015 Last seen - Jul 23, 2013 at 02:55 PM
sorry for bad english
aptpsbwmraj 9 Posts Sunday July 14, 2013Registration date August 21, 2015 Last seen - Jul 25, 2013 at 08:00 AM
0
Thank you
is there no one can solve my problem :(
TrowaD 2391 Posts Sunday September 12, 2010Registration dateContributorStatus July 12, 2018 Last seen - Jul 25, 2013 at 11:25 AM
0
Thank you
Hi,

I think I got a nice solution.
Create an extra textbox.
Format A41 with the second font.
Determine length of the 1ste textbox.
Put both textboxes in A41.
Change the font of the determined length.

Here is the code I used to test my theory:
Dim x As Integer
Range("A41").Font.Name = "Agency FB"
x = Len(TextBox1)
Range("A41") = TextBox1 & TextBox2
Range("A41").Characters(1, x).Font.Name = "Arial"

Best regards,
Trowa
aptpsbwmraj 9 Posts Sunday July 14, 2013Registration date August 21, 2015 Last seen - Jul 26, 2013 at 12:19 AM
thanks alot
you solve my problem
you r my super man :)
aptpsbwmraj 9 Posts Sunday July 14, 2013Registration date August 21, 2015 Last seen - Jul 26, 2013 at 01:18 PM
sorry for disturb you again. but can you tell me how to set in four textboxes . like agency fb then arial then agency fb then arial . thanks for suport.