LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default Bolding using VBA


The project that I'm working has the following structure
If item A is true - show sentence 1
If item B is true - show sentence 2
if item C is true - show sentence 3
..
..
..
The list item is always true and show its sentence and make it bold (for
this example lets assume that there are 45 characters is this sentence).

I have the logic built to show only the "true" items. The "twist" is that
these sentences need to be in paragraph form (therefore I have a macro that
will "fill-justify these sentences into paragraph form and it works).
Therefore, the last sentence could be in the last line or the last two lines.

Is the best way to make sure the I bold the right text as follows:

Start with the last row - count how many characters are in it.
If it has more characters that the sentence that I'm concered about
activecell.characters(2,45).font.bold = True (this assumes the last
sentence is would start in position 2.

If the last row as less characters than 45 characters
bold the last row. - move up a row and bold the last (45-number of
characters from row below) characters.

I'm assuming that this will work or is there a better way to do this?

Or am I not making sense?

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with formula for bolding font Roger Excel Worksheet Functions 3 December 5th 07 04:08 PM
Macro Help - Bolding info ALC[_2_] Excel Programming 2 August 9th 05 02:51 PM
Bolding Row from VB6 Ian B[_2_] Excel Programming 4 July 9th 05 11:19 PM
Bolding when subtotalling mrsteve1 Excel Worksheet Functions 2 February 17th 05 11:26 PM
Bolding Dale[_12_] Excel Programming 2 September 30th 04 04:21 PM


All times are GMT +1. The time now is 01:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"