none
Formule excel RRS feed

  • Question

  • Hello,

    I would like help for a problem, my manager requested that when selecting a cell with the mouse click

    is marked with an OK, a kind of control, I even managed to do putting this control in the cells by the developer guide, but since the spreadsheet has 10000 thousand lines, after completing, the worksheet does not open.

    Example:

    Document   Digitized 

    100             OK
    101             OK
    102

    I need control, a macro if possible, that when the user clicks on the cell of the DIGITED column, be marked in some way that he has completed this

    Can someone help me?
    Friday, April 27, 2018 1:03 PM

Answers

  • Hi Luis

    You can achieve what you want with an event procedure.  Assuming that you are working with Sheet1 and that column A is your "Document" and column B is your "Digitized", in the Visual basic Editor, select Sheet1.  Select "Worksheet" from the dropdown at the top left and select "SelectionChange" from the dropdown at top right.  Then paste in the code:

    If Target.Column = "2" Then

           Target.Value = "OK"

    End If

    You will need to adjust the "Target Column" to the one used in your worksheet.

    Depending on the range covered by your "Documents", you will probably need to limit the range over which the procedure applies.  You might also wish to use a message box to confirm that the user has not clicked the "Digitized" column accidentally.

    Andy C

    Monday, April 30, 2018 8:59 AM
  • Hi Luis Padilha,

    You had mentioned that," I even managed to do putting this control in the cells by the developer guide, but since the spreadsheet has 10000 thousand lines, after completing, the worksheet does not open."

    I want to confirm with you that is your code working correctly?

    You said worksheet does not open. did you get any error? or Application get hanged?

    It is possible that you did not wrote a code properly cause this issue.

    I suggest you to make a test with the code suggested by AndyColRomsey

    It can solve your issue.

    If you think that it can work for you then mark AndyColRomsey's suggestion as an answer.

    If you have any further question then let us know about it.

    We will try to provide you further suggestions to solve the issue.

    Regards

    Deepak 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Luis Padilha Tuesday, May 15, 2018 8:06 PM
    Tuesday, May 1, 2018 2:16 AM
    Moderator

All replies

  • Hi,

    This is the forum to discuss questions and feedback for Microsoft Excel features, I'll move your question to the MSDN forum for Excel

    https://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

    Regards,

    Emi


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Monday, April 30, 2018 6:09 AM
  • Hi Luis

    You can achieve what you want with an event procedure.  Assuming that you are working with Sheet1 and that column A is your "Document" and column B is your "Digitized", in the Visual basic Editor, select Sheet1.  Select "Worksheet" from the dropdown at the top left and select "SelectionChange" from the dropdown at top right.  Then paste in the code:

    If Target.Column = "2" Then

           Target.Value = "OK"

    End If

    You will need to adjust the "Target Column" to the one used in your worksheet.

    Depending on the range covered by your "Documents", you will probably need to limit the range over which the procedure applies.  You might also wish to use a message box to confirm that the user has not clicked the "Digitized" column accidentally.

    Andy C

    Monday, April 30, 2018 8:59 AM
  • Hi Luis Padilha,

    You had mentioned that," I even managed to do putting this control in the cells by the developer guide, but since the spreadsheet has 10000 thousand lines, after completing, the worksheet does not open."

    I want to confirm with you that is your code working correctly?

    You said worksheet does not open. did you get any error? or Application get hanged?

    It is possible that you did not wrote a code properly cause this issue.

    I suggest you to make a test with the code suggested by AndyColRomsey

    It can solve your issue.

    If you think that it can work for you then mark AndyColRomsey's suggestion as an answer.

    If you have any further question then let us know about it.

    We will try to provide you further suggestions to solve the issue.

    Regards

    Deepak 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Luis Padilha Tuesday, May 15, 2018 8:06 PM
    Tuesday, May 1, 2018 2:16 AM
    Moderator