PDA

View Full Version : Need macro to delete module content



rhxiong
10-16-2007, 09:59 AM
I am runnig a private sub to start a macro (Format) that formats and saves a file. After the file is saved, the private sub is still part of the new file and when it opens up, the formatting macro (Format) runs, messing everything up. Can I put some code in the private sub or the formatting macro (Format) to stop the private sub macro from running once I save the file as something else?

Bob Phillips
10-16-2007, 12:48 PM
Just add a test in the macro that will stop it running, say on some formatted cell.

lucas
10-16-2007, 02:22 PM
What application is this for....Word, Excel.....?

I'm moving this to the excel forum for now until you tell me different. Try to post in the appropriate forum in future. Site and forum related does not seem to address your needs.