Solved: EXCEL: auto open

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

sk0101

Thread Starter
Joined
Nov 8, 2007
Messages
277
Hi,

When I open the excel a Sub Auto_Open() is been executed...

Is there away to count how many times the Excel was opened??

Thank you
 
Joined
Sep 4, 2003
Messages
4,912
The easiest way to do this is to store the running count in an unused cell. Each time the workbook is opened you would just increment the number using VBA code. You can store the value on a hidden sheet so that the end user is not aware of it.

Regards,
Rollin
 
Joined
Jul 1, 2005
Messages
8,546
It is a great idea. But you need to add ActiveWorkbook.Save right after incrementing the number (unless what you really want is a count of how many times the workbook was changed).

HTH
 
Joined
Jul 25, 2004
Messages
5,458
Hi there,

To save on Excel overhead, I would think about using a text file to append to in your auto open. Doing it this way will save any additional sub routines from running. One routine, one update. Let us know if you'd like something like that. In fact, most of it is already worked out here: http://www.vbaexpress.com/kb/getarticle.php?kb_id=351

Take care!
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Top