I need to be able to count the no. of times a sprdsheet is opened

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a spreadsheet on a common drive accessed by workmates. I need a simple
counter to tell me how many times the sheet is opened. Any assistance is
appreciated.
Cheers
 
Create a new workbook that is hidden in the same directory. Now in the
original spreadsheet create a macro that will run in the
"workbook_open" method that adds 1 to cell A1 in the hidden workbook.

Cheers,
Jason Lepack
 
For this to work, macros must be enabled. If the user elects not to run
macros (when the security level allows the user to choose whether to run
macros), then the counter won't get bumped. Also, the counter could be in
the actual workbook, if desired. It could be an unnoticed cell in a hidden
row or column, in a hidden sheet, or a named value (Insert - Name - Define)
which the macro could modify. The font color could be white, making it
invisible. The code should keep two of these counters. If they don't
agree, it's likely that a user has found one and changed it. Let the games
begin.

The VBA project could be locked to keep users from seeing what the code
does. Tools - VBA project properties - Protection tab - Lock project for
viewing. This is said to be more secure than Excel's passwords for stuff
like opening the file, protecting worksheets and workbooks, etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top