Solved

Disable Save/Save As...  ? (VBA)

Posted on 2004-10-29
1,490 Views
Last Modified: 2012-05-05
Hi everyone,

Is there a way to disable the Save & Save As... commands in Word/Excel/etc on a per document basis (macro/VBA)?

We have a problem with people who open a shared file to edit, then leave it open so no one else can edit it. Right now, most people go ahead save their own version locally, then they all email their local versions to someone to compare and merge.

The suggested solution we would like to try is that if a document is opened as read-only, then the Save and Save As... features are disabled, forcing the user to come back later and update the single shared file.

I know this may pose problems of it's own, but it's something we're at least willing to try, if possible.

Thanks in advance,
chris
0
Question by:pillbug22
    1 Comment
     
    LVL 8

    Accepted Solution

    by:
    Hi pillbug22,

    disable the buttons with retreiving the commandbar with .CommandBars("File")
    then disable the 2 buttons. Teh nyou have to create a local hook to prevent CTRL+S etc.

    Cheers!

    jupiler78
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: JavaScript Coding - Massive 12-Part Bundle

    Regardless of your programming skill level, you'll go from basics to advanced concepts in a vast array of JavaScript subjects including Sammy.js, Agility.js, Ember.js, Node.js, jQuery, AJAX, Extjs, AngularJS, Knockout.js, and JSON.

    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
    The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    846 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now