oro777
oro777

Reputation: 1110

Excel save as on Run

In Excel, after writing a VBA script, I would like Excel to save the file before running it.

It is common on most of the programming tools. While testing a program, it may crash and my program may not be saved but if it saves before each run, I won't have this problem anymore.

I know there is a automatically save option in Excel but is there another alternative ?

Upvotes: 1

Views: 64

Answers (1)

user5772563
user5772563

Reputation:

Add

ActiveWorkbook.Save

at the beginning of your macro

Upvotes: 3

Related Questions