running a specific macro on opening and closing a workbook

  • Thread starter Thread starter kimt
  • Start date Start date
K

kimt

Afternoon all!

I have an excel 97 workbook that contains 25 sheets of various types o
information. In an effort to prevent users from entering dat
incorrectly or in the wrong order, they are prompted through the sheet
one by one using two buttons..."return to main menu" or "continue".
The last macro sorts the data into a table consisting of all othe
employee's and prints the documents required. It closes by clearin
all of the form documents, hiding all documents except "main menu" an
returning to the Main Menu.

I have another macro called "freshstart" which will also clear all th
forms save the data and restart at the "main menu". My problem is tha
if the user is able to stop the process mid stream, and close th
workbook (or if it crashes) before it runs its full cycle, when the
open the workbook next time it will be were they left off. I nee
"freshstart" to run everytime this work book is opened
 
Create another macro called Auto_Open that calls frsehstart

Public Sub Auto_Open
freshstart
End Sub

this runs on workbook open, as long as it is not opened from VBA>

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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