Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format in text boxes with multiple text lines
I have an excel application which automatically adds textboxes when the user
clicks on a button. Each text box must accommodate two text lines: an upper one and a lower one. The upper line has bold 12-size bold arial font. This text line (text & format) is generated by the code. The lower line is typed in by the user and it must have a predefined format. I would like this line to be ready for my users to start typing. I would like to implement the following behavior in each textbox: whenever the user clicks on the textbox the cursor must be on the lower text line, which must have italic 10-size bold times new roman font: this lower line is already formatted for the user to start typing. How can I accomplish this? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format in text boxes with multiple text lines
This will work. I'm not sure which type texttboxes yo are dealing with. The
olebojects didn't work for me but this did. Sub test() Set NewBox = Worksheets(1).Shapes.AddTextbox(msoTextOrientation Horizontal, _ 100, 100, 200, 50) With NewBox.TextFrame FirstRow = "Joel" .Characters.Text = FirstRow & Chr(10) BoxLen = Len(.Characters.Text) .Characters(Start:=1, Length:=4).Font.Size = 12 .Characters(Start:=BoxLen, Length:=1).Font.Size = 10 End With End Sub "Jess" wrote: I have an excel application which automatically adds textboxes when the user clicks on a button. Each text box must accommodate two text lines: an upper one and a lower one. The upper line has bold 12-size bold arial font. This text line (text & format) is generated by the code. The lower line is typed in by the user and it must have a predefined format. I would like this line to be ready for my users to start typing. I would like to implement the following behavior in each textbox: whenever the user clicks on the textbox the cursor must be on the lower text line, which must have italic 10-size bold times new roman font: this lower line is already formatted for the user to start typing. How can I accomplish this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
User Form Text Boxes - Copy format of text boxes | Excel Discussion (Misc queries) | |||
Setting an array of text boxes equal to individual form text boxes | Excel Programming | |||
Format Text Boxes | Excel Programming | |||
Display multiple lines of text within a cell from multiple column. | Excel Worksheet Functions | |||
Mysteriously Shifting Lines and Text Boxes | Charts and Charting in Excel |