![]() |
Multiple text format in Excel cells
I'm writing now convertor from my own Report Component to Microsoft Excel
format and have a problem: cannot programmically change font and text format for PARTS of text in cell. It's easy to do by hand, but how can I do it programmically? Please help me! I have to appear checkboxes and comboboxes in Excel sheet, and decided to do it in following manner: [x] CheckboxName, where [x] - symbol with code 0xFD of Wingdings font. Or, maybe, there are other ideas? David Avsajanishvili |
Multiple text format in Excel cells
Hi David,
Try the following code which resulted from macro recorder (I have cleaned it a bit). Ragards, KL Sub Macro2() ActiveCell = "Text Test" With ActiveCell With .Characters(Start:=1, Length:=4).Font .Size = 10 .ColorIndex = 0 End With With .Characters(Start:=6, Length:=4).Font .FontStyle = "Bold" .Size = 10 .ColorIndex = 3 End With End With End Sub "David Avsajanishvili" <David wrote in message ... I'm writing now convertor from my own Report Component to Microsoft Excel format and have a problem: cannot programmically change font and text format for PARTS of text in cell. It's easy to do by hand, but how can I do it programmically? Please help me! I have to appear checkboxes and comboboxes in Excel sheet, and decided to do it in following manner: [x] CheckboxName, where [x] - symbol with code 0xFD of Wingdings font. Or, maybe, there are other ideas? David Avsajanishvili |
Multiple text format in Excel cells
Thank you, KL!
The code works, and it's really, what I need! |
All times are GMT +1. The time now is 05:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com