Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro to exit spreadsheet file

Status
Not open for further replies.

tashu

Computer
Apr 26, 2008
1
GB
Hi,

I was wondering if any of you can help me with VBA code or else so i can add a button wth macro function on it which will automatically close the spreadsheet system open.

and i am not sure whether this is possible or not
BUT can we password protect macros? So that if we have to run certain macro, it should ask us for some password before it runs or carry out its function.


Thanks
your help will really be appreiciated
 
Replies continue below

Recommended for you

To close worksheet by macro, use worksheet_deactivate()

If the macro is on the sheet and the sheet is protected, the macro cannot run as the macro cannot activate the sheet to perform.

Robert Mote
 
Here's some sample code you can try to protect a macro with a password. Enjoy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top