Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: code adjustment

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    465
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Tom was kind enough to post a code, which works quite well. I would now like to make the following adjustments: Bold Italic and to have the cell highlighted in light yellow. Here's the code:

    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    If Intersect(Target, Range("A1:D20")) Is Nothing Then Exit Sub
    Target.Font.FontStyle = "Bold"
    End Sub

    Can this be done?

    Thanks Again,

    Anthony

  2. #2
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Yup:


    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    If Intersect(Target, Range("A1:D20")) Is Nothing Then Exit Sub
    With Target
    .Font.Bold = True
    .Font.Italic = True
    With .Interior
    .ColorIndex = 36
    .Pattern = xlSolid
    End With
    End With
    End Sub


    HTH

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Posts
    465
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Worked like a charm Mark...........Thanks!!!

    Anthony

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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