May 09 2024 06:13 AM - edited May 09 2024 08:07 AM
In above picture, the first character of the cell is bold, and the second is not. However, in aa, when I select the cell, the cell is not shown as bold; in bb, the cell is shown as bold.
How to reproduce aa in VBA? When I use Characters(,).Font, it always give me results like bb.
The purpose is, I need to manually input some text after the 2 characters. In bb, my manual input become bold, but I do not want this.
Thanks in advance.
May 09 2024 07:21 AM - edited May 09 2024 07:25 AM
The following is just a guess.
Excel has a fairly complicated way of storing cell contents and formatting. It looks like it matters how you apply the format.
However, as you have found, it does not work this way in VBA. Regardless of how you populate a cell and format its characters, B will be highlighted if the first character is bold.