+ Reply to Thread
Results 1 to 8 of 8

Problem with Running Macro to Enter Date Stamp when Corresponding Check Box is Checked

  1. #1
    Registered User
    Join Date
    10-02-2012
    Location
    Appleton, Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    11

    Problem with Running Macro to Enter Date Stamp when Corresponding Check Box is Checked

    I have watched tons of You Tube videos, searched and tried many ways to write and assign a macro to allow me to have it so that when a user checks the box in column C the corresponding column D automatically places the date (when the box in column C was checked). I have checked that macros are enabled. I have checked that the macro is assigned to the current worksheet. There are two screen shots here. But this is just where I left off. Any ANY help would be appreciated.

    Thank you!
    Attached Images Attached Images

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Problem with Running Macro to Enter Date Stamp when Corresponding Check Box is Checked

    I put your code into a workbook and it worked fine (see attached).
    For troubleshooting, attaching a workbook with dummy data is always preferrible to a screenshot (Go Advanced> Manage Attachments)
    Your code says to put the date in column C (column 3) when something is entered into Col B (2)
    You're checking a checkbox? Is this checkbox linked to a cell?
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    10-02-2012
    Location
    Appleton, Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Problem with Running Macro to Enter Date Stamp when Corresponding Check Box is Checked

    First of all...thanks for your response and help. I am attaching the excel doc as you suggested. I did see that your workbook works. I am very interested to find out what I am doing incorrectly!

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Problem with Running Macro to Enter Date Stamp when Corresponding Check Box is Checked

    Ugh, this is why I don't like checkboxes. (I usually create a cell as a checkbox (see attached)). In any case, I think that writing a code to get col C to change when the checkbox is checked might not be too hard but would have to be done for each checkbox. I'm betting someone has a macro that does this task for them. I suggest getting a moderator to move this to the Programming forum where you'd get more help.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-02-2012
    Location
    Appleton, Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Problem with Running Macro to Enter Date Stamp when Corresponding Check Box is Checked

    Thanks so far for your help. I spent some time playing with the workbook you sent over. I think if I had to stick with entering text into a cell and have the corresponding cell date stamp that would work out. Is there a way to either create a behavior within a cell that when clicked inside a "check mark" appears or to have a drop down in the first cell that allows a user to select a term like "in process" or "completed", etc. that would trigger the date stamp? I really want to automate things as much as possible, even though it seems like such a little thing. By the way, I did play and can kind of see why it is different when adding a check box -- kind of layering an object onto the actual cell...which is different than I have perceived before.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Problem with Running Macro to Enter Date Stamp when Corresponding Check Box is Checked

    You can use code similar to what you orignially had to trigger an event based on whether there's a checkbox or not. Let me know what sort of checkbox you decide on and I'll help you with that. You're correct, the original code didn't work because the checkbox is an object overlaid on top of the cell and isn't actually in the cell.

  7. #7
    Registered User
    Join Date
    10-02-2012
    Location
    Appleton, Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Problem with Running Macro to Enter Date Stamp when Corresponding Check Box is Checked

    Ultimately, I would like to have the box (that the user interacts with) to either have an existing place to "check" (which is why I chose to use a checkbox) or even better yet, when a person clicks in the "completed" column...(I would rename it "status" column actually, if I could accomplish my goal) and there would be a drop down menu. That menu would allow them to choose a status "complete" or "in progress", etc. Then, upon selection of that "status" the date stamp would appear in the next cell. Does that seem possible? It seems like it should be.

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Problem with Running Macro to Enter Date Stamp when Corresponding Check Box is Checked

    I used the Marlett technique, a check in Marlett is an "a" in general text.
    Here's the code I used
    Please Login or Register  to view this content.
    I also put an If statement in column C for "Completed" / "Not Yet completed"
    Questions?
    Attached Files Attached Files

+ 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