+ Reply to Thread
Results 1 to 2 of 2

That Save Button/Command

Hybrid View

  1. #1
    Registered User
    Join Date
    06-19-2018
    Location
    Blackpool, England
    MS-Off Ver
    Newest
    Posts
    6

    That Save Button/Command

    Hi All

    As we all know Excel has a save button along the top and a save command.

    When we select or press save Excel is obviously running a program to do it. Where is this program and can users edit it? I want access to that programming to stick a macro inside so that whenever anybody presses save the macro executes.

    Thanks All
    Titantula!

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: That Save Button/Command

    You don't have access to that code, but there is a Before Save event procedure where you can trap any workbook save event and run your code.

    Guide: Run A Procedure Before Saving A Workbook
    https://www.engram9.info/excel-vba-p...-workbook.html


    Put this in the ThisWorkbook code module.

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
        
        'Your code here
        
    End Sub
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

+ 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. [SOLVED] Save File Command Button
    By Jr66 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-22-2016, 03:03 AM
  2. [SOLVED] Command save button?
    By A108A108 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-14-2016, 08:05 PM
  3. [SOLVED] 'Save' or 'save as' Command Button VBA Excel
    By eemiller1997 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-07-2013, 04:09 PM
  4. Command Button Save vs Save as
    By brharrii in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-10-2012, 04:39 PM
  5. Command button to save
    By troysie in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-31-2011, 04:26 AM
  6. Save Command Button Help!
    By EnGo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-27-2006, 04:55 PM
  7. [SOLVED] Command Button Prompt Save As?
    By Rich in forum Excel General
    Replies: 3
    Last Post: 05-17-2006, 09:40 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