Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
A macro that counts the number of times a file is opened
Can a macro be written that will count the number of times a file has
been opened? If so, can the count be shown in a designated cell such as A1. And would the count be affected if the file is saved under a different name? If you know how to write such a macro, its formulation would be much appreciated. Thanks. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
A macro that counts the number of times a file is opened
Mr Lanier
You could use a Workbook_Open event thus Private Sub Workbook_Open() Worksheets("Tracker").Range("A1").Value = _ Worksheets("Tracker").Range("A1").Value + 1 End Sub This put the value in A1 on a sheet called tracker, remember users have a habit of changing or deleting stuff, so you may want to hide the worksheet. To implement, right click on the small Excel icon for the workbook and select view code. Paste the code here, save and close -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS www.nickhodge.co.uk wrote in message ups.com... Can a macro be written that will count the number of times a file has been opened? If so, can the count be shown in a designated cell such as A1. And would the count be affected if the file is saved under a different name? If you know how to write such a macro, its formulation would be much appreciated. Thanks. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
A macro that counts the number of times a file is opened
Just a caution - if a user has macros disabled (Excel's default), your macro
will not run Bob Flanagan Macro Systems 144 Dewberry Drive Hockessin, Delaware, U.S. 19707 Phone: 302-234-9857, cell 302-584-1771 http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel wrote in message ups.com... Can a macro be written that will count the number of times a file has been opened? If so, can the count be shown in a designated cell such as A1. And would the count be affected if the file is saved under a different name? If you know how to write such a macro, its formulation would be much appreciated. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Loop Macro a variable number of times | Excel Discussion (Misc queries) | |||
Using Macro to Save Copy of File to New Location | Excel Discussion (Misc queries) | |||
Formula for current month minus one = Quarter number in a macro. | Excel Discussion (Misc queries) | |||
A new sequence number in file everytime it is opened | Excel Worksheet Functions | |||
Weekly Transaction Processing | Excel Worksheet Functions |