×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Macro to exit spreadsheet file

Macro to exit spreadsheet file

Macro to exit spreadsheet file

(OP)
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

RE: Macro to exit spreadsheet file


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
www.motagg.com

RE: Macro to exit spreadsheet file

Here's some sample code you can try to protect a macro with a password.  Enjoy

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources