Add two type mix font in one cell in excel 2003

Solved/Closed
aptpsbwmraj Posts 9 Registration date Sunday July 14, 2013 Status Member Last seen August 21, 2015 - Jul 21, 2013 at 01:13 PM
aptpsbwmraj Posts 9 Registration date Sunday July 14, 2013 Status Member Last seen August 21, 2015 - 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
Related:

4 responses

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 555
Jul 29, 2013 at 10:40 AM
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
3
aptpsbwmraj Posts 9 Registration date Sunday July 14, 2013 Status Member Last seen August 21, 2015
Aug 17, 2013 at 10:00 AM
Thanks Friend
0
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 555
Jul 23, 2013 at 12:03 PM
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
0
aptpsbwmraj Posts 9 Registration date Sunday July 14, 2013 Status Member Last seen August 21, 2015
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
0
aptpsbwmraj Posts 9 Registration date Sunday July 14, 2013 Status Member Last seen August 21, 2015
Jul 23, 2013 at 02:55 PM
sorry for bad english
0
aptpsbwmraj Posts 9 Registration date Sunday July 14, 2013 Status Member Last seen August 21, 2015
Jul 25, 2013 at 08:00 AM
is there no one can solve my problem :(
0
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 555
Jul 25, 2013 at 11:25 AM
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
0
aptpsbwmraj Posts 9 Registration date Sunday July 14, 2013 Status Member Last seen August 21, 2015
Jul 26, 2013 at 12:19 AM
thanks alot
you solve my problem
you r my super man :)
0
aptpsbwmraj Posts 9 Registration date Sunday July 14, 2013 Status Member Last seen August 21, 2015
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.
0