Solved

Excel Spreadsheet - log time of click of checkbox

Posted on 2010-09-10
12
461 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 34

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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
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 the scrolling table in Microsoft Excel using the INDEX function.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

752 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