Hi unfolgsamone and welcome to ExcelForum,
Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.
Posting code between [CODE] [/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.
Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
(This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
Because this is your first post, I will attempt to answer your question.
I haven't tested your code, but it looks like it works OK. To do what you want:
a. Unrelated to your question, but you should probably stop the timer each time the workbook closes in module ThisWorkbook, Sub Workbook_BeforeClose().
b. When you close the workbook, it looks like you need to save the value of global variable Etime, which means you should also make sure the workbook gets saved each time you close the workbook. You can save the Etime value in a cell of your choice. You could alternately save it in a Workbook Built In Property or Custom Property of your choice.
c. When you open the Workbook, you can retrieve the value of Etime.
d. You will probably also need a routine to reset the value of Etime to 0.
The following thread solves a similar question, and uses a 'Built In Property' to save the value of 'Total Editing Time'. http://www.excelforum.com/excel-gene...ml#post3745324
If you have additional questions or problems with this, I suggest you upload a sample workbook. When you upload a sample workbook, you will usually get responses sooner, that are more correct.
Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.
Remember to desensitize the data.
Click on GO ADVANCED and use the paperclip icon to open the upload window.
View Pic
Lewis
Bookmarks