+ Reply to Thread
Results 1 to 2 of 2

Disable SaveAs On Toolbar But Allow in Macro

  1. #1
    Forum Contributor
    Join Date
    08-24-2006
    Location
    Sevenoaks, Kent
    MS-Off Ver
    Office 365 ProPlus
    Posts
    459

    Disable SaveAs On Toolbar But Allow in Macro

    Good afternoon,

    I'm trying to restrict my agents from pressing "save as" in excel instead of pressing my Save Macro button. I added a bit of code to a "beforesave" action which stopped the agent from having the ability to "save as" but it has also stopped my Save Macro button code from running when it gets to the "save as" part. What can I do to disable the agent from pressing "save as" from the file menu but allow the code to run from the macro?

    Stop Save As

    Please Login or Register  to view this content.
    Save Macro Button

    Please Login or Register  to view this content.
    Thanks in advance

    DJ

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Disable SaveAs On Toolbar But Allow in Macro

    One way to do this is in the module containing your SaveAs code to add a Public variable

    Please Login or Register  to view this content.
    Then in SaveAs, make these changes before and after the call to SaveAs (I recommend against using SaveAs as a Sub name--it's valid but easily confused with the SaveAs method of Workbook)

    Please Login or Register  to view this content.
    Then in the event handler:
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Disable Save/SaveAs in 2007
    By ultimastryder in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-10-2013, 10:26 AM
  2. Disable/Enable Save,SaveAs & Sendto in File Menu based on condition
    By aravindhan_31 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-16-2011, 04:43 AM
  3. Disable Mini Toolbar
    By Bravurian17 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-10-2009, 10:53 AM
  4. Toolbar buttons disable
    By rdipas3 in forum Excel General
    Replies: 4
    Last Post: 04-14-2008, 08:17 PM
  5. Disable toolbar drop down
    By BobbyS in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2006, 06:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1