Results 1 to 3 of 3

Thread: [RESOLVED] Changing Font Size, Bolding, Italicizing And Underlining In Excel VBA

  1. #1

    Thread Starter
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Resolved [RESOLVED] Changing Font Size, Bolding, Italicizing And Underlining In Excel VBA

    I have a number of reports that, thanks to the incomparable DKenny, are working like a champ. Now that the "meat and potatoes" are done, I need to "pretty" them up.

    I have a two line report heading in A:1 and A:2

    How would I make just those cells Bold and Italicized?

    (I have other things I need to do, but I figure I can take how ever this is done and use that as guide for the rest of the "prettying" up I need to do.)

  2. #2
    Frenzied Member DKenny's Avatar
    Join Date
    Sep 2005
    Location
    on the good ship oblivion..
    Posts
    1,171

    Re: Changing Font Size, Bolding, Italicizing And Underlining In Excel VBA

    VB Code:
    1. With shWorkSheet.Range("A1:A2").Font
    2.     .Bold = True
    3.     .Italic = True
    4. End With
    Declan

    Don't forget to mark your Thread as resolved.
    Take a moment to rate posts that you think are helpful

  3. #3

    Thread Starter
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Changing Font Size, Bolding, Italicizing And Underlining In Excel VBA

    I actually came back here to delete this thread because I figured it out, but, I like your way better so I'm glad you popped in before I waxed this. I was doing
    VB Code:
    1. shWorkSheet.Range("A1").Font.Bold = True
    2.     shWorkSheet.Range("A2").Font.Bold = True
    Didn't know about the A1:A2 trick.

    Cool.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width