+ Reply to Thread
Results 1 to 2 of 2

How do I create a macro to color a cell only when I click on it?

  1. #1
    Figz
    Guest

    How do I create a macro to color a cell only when I click on it?


    --
    Qwest4Info

  2. #2
    Tom Ogilvy
    Guest

    Re: How do I create a macro to color a cell only when I click on it?

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Cells.Interior.ColorIndex = xlNone
    Target.Interior.ColorIndex = 5
    End Sub

    Uses the Sheets SelectionChange Event. (Placed in the sheets code module;
    right click on the sheet tab and select view code)

    See Chip Pearson's page on events for reference

    http://www.cpearson.com/excel/events.htm

    --
    Regards,
    Tom Ogilvy


    "Figz" <Figz@discussions.microsoft.com> wrote in message
    news:3844D93F-2E57-45F6-B0EC-837C7148A6E0@microsoft.com...
    >
    > --
    > Qwest4Info




+ Reply to Thread

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