Results 1 to 9 of 9

Formatting cell in same row as active cell, then reset format on row selection change

Threaded View

jellyjen17 Formatting cell in same row... 01-25-2012, 05:31 PM
TMS Re: Formatting cell in same... 01-25-2012, 05:54 PM
jellyjen17 Re: Formatting cell in same... 01-25-2012, 06:09 PM
OnErrorGoto0 Re: Formatting cell in same... 01-25-2012, 06:13 PM
jellyjen17 Re: Formatting cell in same... 01-25-2012, 06:52 PM
TMS Re: Formatting cell in same... 01-25-2012, 07:01 PM
jellyjen17 Re: Formatting cell in same... 01-25-2012, 07:33 PM
TMS Re: Formatting cell in same... 01-25-2012, 07:36 PM
jellyjen17 Re: Formatting cell in same... 01-25-2012, 07:38 PM
  1. #1
    Registered User
    Join Date
    12-09-2011
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2007/2010
    Posts
    20

    Formatting cell in same row as active cell, then reset format on row selection change

    Hello,

    I have the following code, which will format the cell in column D of the same row of the active cell, changing the font to bold and color to red. This works, except when another cell is selected in a differet row, I need to reset the format of the column D cell that was just changed. How do I reset the format of that cell (bold=false, color=black)?

    Any help would be much appreciated!


    Code:
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    
        With ActiveCell
            Cells(Application.ActiveCell.Row, 4).Select
            Cells(Application.ActiveCell.Row, 4).Font.Bold = True
            Cells(Application.ActiveCell.Row, 4).Font.Color = -16776961
        End With
    
    End Sub
    Last edited by jellyjen17; 01-25-2012 at 07:38 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1