Solved

Excel Spreadsheet - log time of click of checkbox

Posted on 2010-09-10
12
457 Views
Last Modified: 2012-06-22
Hi

I have never programmed in excel but have lots of programming with Delphi, and have been given a problem of logging the time a particular checkbox was ticked.

This will apply to about 140 individual checkboxes and ideally the results need to be in a password protected area, so the person doing the ticking can't mess with the result

thanks
0
Comment
Question by:rcdcsjdc
  • 6
  • 3
  • 2
  • +1
12 Comments
 
LVL 5

Expert Comment

by:briangochnauer
ID: 33645642
Not possible without installling "keylogger" software.
0
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 33647097
"Keylogging" has nothing to do with it.

The short answer is that yes, almost certainly you can do this.

The catch, of course, is two-fold:

1) If macros are not enabled, it will not work, and depending on Group Policy the end user may have some control over that

2) The password protection offered by Excel here (protecting worksheets + workbook structure, protecting VBA project) is extremely weak, and can be hacked in seconds using cheap and readily available tools.

Still interested?
0
 
LVL 33

Expert Comment

by:Norie
ID: 33655720
Like matthew has said this is likely to be possible, but why 140 checkboxes?

What is it you are actually logging?

0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

by:rcdcsjdc
ID: 33669962
Thank you Matthewspatric and imnorie.
I always knew it would be possible and i suspected that it could be hacked by competent people.
The operatives that will be ticking the boxes are play centre operatives and the manager informs me that both ability levels and interest are low. It's more a manual operative environment so the likelihood of suffucient skill is very low and the benefits relatively minor.
There are so many checkboxes because each one indicates a task done. There are 20 tasks and they are done daily for health and safety reasons like checking of fridge temperatures etc, so the records are required to be kept by law. The main current issue is that there are mountains of unfiled illegible paper that continues to build, so I have been requested to provide this spreadsheet so they can indicate that they have done the check and the time it was done.
Thanks
0
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 33671439
Based on your description, I am thinking that you would ultimately be better off implementing this as an intranet tool.  This has a major advantage: it keeps all of the data in a central store at every step of the process, and that data store can be secured.

It may require more work up front to get started, but long term I think it is the way to go.
0
 
LVL 5

Expert Comment

by:briangochnauer
ID: 33671591
I had a brain fart. check the file attachment.
TimestampCkb.xls
0
 
LVL 5

Expert Comment

by:briangochnauer
ID: 33671843
I like using a form like this, it's a cleaner interface.
TimestampCkb.xls
0
 

Author Comment

by:rcdcsjdc
ID: 33673986
Than you briangochnauer
I downloaded the code but I get the error
cannot run the macro "TimestampCkb(1).xls!CheckBox1_Click, the macro may not be available in this workbook or all macros may be disabled
I have tried all macro security settings including enable all macros but to no avail, so I am assuming something is missing in this sheet
Thanks
0
 
LVL 5

Expert Comment

by:briangochnauer
ID: 33690907

Then you'll have to create the macro;
Open a sheet insert a checkbox on it;
Right-click on checkbox then click 'Format Control' then choose 'Control' tab
In 'Cell Link' type $H$1,  click 'OK'

Right-click on the checkbox and 'Assign Macro' click 'Record'
Insert  (Bold );

Sub CheckBox1_Click()
    If CheckBox1  Then
          Worksheets(1).Range("I1").Value = Now

     End If
End Sub

Of course the worksheet range storing the value could be any sheet even a hidden sheet.
0
 
LVL 5

Accepted Solution

by:
briangochnauer earned 500 total points
ID: 33690988
Remove the 'IF' statement
Sub CheckBox1_Click()
         Worksheets(1).Range("I1").Value = Now
End Sub
 
0
 
LVL 5

Expert Comment

by:briangochnauer
ID: 33691323
You could actually do it without using a macro (simplify) by
Right-click on checkbox then click 'Format Control' then choose 'Control' tab
In 'Cell Link' type $H$1,  click 'OK'
then in cell i1 use the formula      =IF(H1=TRUE,NOW(),"")

ClipXLS.jpg
0
 

Author Closing Comment

by:rcdcsjdc
ID: 33691467
gave enough information to solve what was asked so I am happy
0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question