Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Automatic Timestamp based on Checkbox Click in VBA

0

Hey I am still a beginner at VBA, and I recently watched the video on Automatically Timestamping Data Entries in Excel. what I am looking for is as below:

I am trying to build Task Sheet where in :

column A is Task Description,

column B is Checkbox for "start time"  

column D is Checkbox for "End time"  

I want to write something that would autopopulate timestamp for Start time in column C when Column B checkbox is clicked & autopopulate timestamp for End time in column E  when Column D checkbox is clicked, Can someone help here ?

Answer
Discuss

Answers

0
Selected Answer

Hello Palmay and welcome to the forum.

Solving your problem was easy with help from Don's tutorial on this site: "https://www.teachexcel.com/excel-tutorial/2444/add-check-marks-to-cells-by-double-clicking-or-typing"

I have attached a sample file with two different ways of indicating "Started" and "Finished". Sheet1 places a checkmark and Sheet2 places an X in the Started and Finished columns when the cell is double-clicked.

Enjoy.

Discuss

Discussion

@ Willie (Doug) - good work!

@ Palmay - Please note that, for your guidance, Doug has helpfully commented each of the macros behind the two sheets
John_Ru (rep: 6142) Jan 23, '22 at 3:41 am
Thankyou so much , this is what i was looking for. 
Palmay (rep: 2) Jan 23, '22 at 8:33 am
Palmay,   I'm glad I could help. There are some visual effects you could add (if you like) to make the sheet more visually appealling. Here are a couple of suggestions. After clicking the "started" checkbox, the checkbox and time cells background turns a pale "yellow" and the "finished" checkbox and time cells turn a pale "red". Then when the "finished" ckeckbox is clicked then both ckeckboxes and both time cells turn a pale green. Get creative.
Cheers.
WillieD24 (rep: 557) Jan 23, '22 at 12:23 pm
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login