Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6703945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:13:54+00:00 2026-05-26T07:13:54+00:00

So, it’s a new week, and I’ve got new ideas for improving things. Part

  • 0

So, it’s a new week, and I’ve got new ideas for improving things. Part of what I do is send out reports to individual offices and departments all over the place; these offices in turn are supposed to go through the information and note inconsistencies. As with everything in life, this turns out to be more trouble than anything else. In an effort to make it a little bit more painless (I hope) I want to try somethinga little different for them. What I would like to do is set up something within the worksheet that the individuals receive that does two things:

  1. First, I would like to set up the worksheet so that when the user
    clicks on a cell the cell is highlighted;
  2. Second, after the cell highlights then the activebox would
    automatically transfer to a “comments” box at the end of the row
    where the user would enter their comments as to why the cell in
    question was highlighted; and
  3. Third, assuming that someone will make a mistake and highlight
    something by mistake I would like to add the additional function
    that if a user selects a cell that is highlighted then it would
    clear the highlight from the cell.

Possible? Suggestions? Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:13:54+00:00Added an answer on May 26, 2026 at 7:13 am

    JMax is correct in identifying the flaw in that you cannot edit a cell if it changes color and selects a comments cell every time you click on it. The best way around this problem is to change the color only on double-click. I would also define the selected row/column and see if they fall within a table’s range (instead of using Application.Intersect) but that’s just personal preference

    Something like…

    Private Sub Worksheet_Beforedoubleclick(ByVal target As Range, cancel As Boolean)
    
    Application.EnableEvents = False
    
    Dim TargRow as Variant
    Dim TargCol as Variant
    
    TargRow = target.Row
    TargCol = target.Column
    
    'Define Header, FirstCol, CommentCol, LastCol as required to define your table/range where you wish these changes to be made. CommentCol is the cell in which comments should be made
    
        If TargRow > Header And TargCol > FirstCol and TargCol < LastCol Then
            If Cells(TargRow,TargCol).Interior.ColorIndex <> -4142 Then 'change color as required to match background
            Cells(TargRow,TargCol).Interior.ColorIndex = 3 'change color as required; this makes them red
            Cells(TargRow,CommentCol).Select
            Else
            Cells(TargRow,TargCol).Interior.ColorIndex = -4142 'match color from start of IF statement
            End If
        End If
    
    Application.EnableEvents = True
    End Sub
    

    Note that we disable events so no other code can be triggered by us selecting a different cell. This is an absolute necessity when implementing the Worksheet_SelectionChange event, less so with the BeforeDoubleClick event

    It’s very important to consider how you trigger macros and how they give the user flexibility. This Excel help video provides a reasonable introduction

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I've got a string that has curly quotes in it. I'd like to replace
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
i got an object with contents of html markup in it, for example: string
I have a jquery bug and I've been looking for hours now, I can't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.