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 6736141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:05:42+00:00 2026-05-26T11:05:42+00:00

Got a workbook with two sheets in it. The first is where the data

  • 0

Got a workbook with two sheets in it. The first is where the data is, and the second has been set up as a “corrections” page. This workbook is sent out to users who are to review it and note inconsistencies/discrepencies. Right now it’s set up to highlight the cell via double-click then forward the active cell to a cell at the end of the same row. As it turns out people want more room for comments so I’ve decided to go with a second sheet that works as a comments sheet. I’ve got the userform and everything with it done except the “submit” button. When the user double-clicks now the cell is still highlighted, but instead of forwarding to the end of row it opens the user form for comments. I’m trying to get the submit button to do two things:
First, I want it to place the row# of the cell that was highlighted into the first column; and second, I want what the user puts in the textbook to be placed into the second column.

I can get it to enter a value in the first row for the textbox, but I don’t know where to start for the row#’s (maybe ActiveCell.Row ?); also, I don’t know how to go about getting it set to move down to the next row if the first row already has comments in it (need something with a Row +1 I guess? It’s just this one last button that’s slowing me up; got the rest done, but I could use some advice on this part of the userform coding. 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-26T11:05:43+00:00Added an answer on May 26, 2026 at 11:05 am

    EDIT:

    This is what I finally came up with to get it working the way I wanted. On the first worksheet the user can double click on the cell, which then highlights the cell and prompts with the user form. If the user cancels then the highlight is removed and the user can keep working; if they enter anything in the box and submit it then the cell addressis placed in one row on the “Comments” page and the text is enteredone column over in the row corresponding to the original cell’s address so I can see where the correction is and what their justification was. Anyways the codes are below.
    I use the following for highlighting and calling the form:

    Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
    
        Application.EnableEvents = False
    
        Dim TargRow As Variant
        Dim TargCol As Variant
    
        TargRow = Target.Row
        TargCol = Target.Column
    
        Header = 8
        FirstCol = 0
        LastCol = 13
        CommentCol = 13
    
        If TargRow > Header And TargCol > FirstCol And TargCol < LastCol Then
            'If the cell is clear
            If Target.Interior.ColorIndex = xlNone Then
                    Cancel = True
    
                'Then change the background to yellow
                Target.Interior.ColorIndex = 6
                Corrections.Show
    
                'Else if the cell background color is already yellow
                ElseIf Target.Interior.ColorIndex = 6 Then
    
                'Then clear the background
                Target.Interior.ColorIndex = xlNone
            End If
        End If
    
        'This is to prevent the cell from being edited when double-clicked
        Cancel = True
    
        Application.EnableEvents = True
    End Sub
    

    And I use this for the user form itself:

    Private Sub UserForm_Initialize()
        TextBox.Value = ""
    End Sub
    
    Private Sub CommandButton2_Click()
    
        Unload Corrections
    
        ActiveCell.Interior.ColorIndex = xlNone
    
    End Sub
    
    Private Sub CommandButton1_Click()
    
        Dim PrevCell As Range
    
        Set PrevCell = ActiveCell
    
        ActiveWorkbook.Sheets("Comments").Activate
        Range("A6").Select
    
        Do
    
        If IsEmpty(ActiveCell) = False Then
    
            ActiveCell.Offset(1, 0).Select
    
        End If
    
        Loop Until IsEmpty(ActiveCell) = True
            ActiveCell.Value = PrevCell.Address
            ActiveCell.Offset(0, 1) = TextBox.Value
    
        Unload Corrections
    
        ActiveWorkbook.Sheets("DataPage").Activate
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I've got this Workbook which contains a lot of data. And I've got
I've got this workbook I've been trying to get to work via macro code.
I've got unit test with this code: Excel.Application objExcel = new Excel.Application(); Excel.Workbook objWorkbook
So I have this Excel workbook which basically is supposed to be a data
I've got this Excel Workbook which I want to search for a specific string
Got some code that is not mine and its producing this warning atm: iehtmlwin.cpp(264)
Got a logfile, and it has all kinds of text in it. Currently it
got a small problem, this code <form action=<?php echo $_SERVER['PHP_SELF']; ?> method=post> <?php ...
I'm trying to import some data from excel into a database . i got
I've got an Excel workbook with a lot of information that I want to

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.