1. M

    Vba BeforeSave to move cursor to cell A1 all on sheets

    Hello Mr.Excel Community, I am trying to find VBA code that moves my cursor to cell A1 on every sheet whenever I save any workbook. I have try to make an Application level event, but keep running in compiling issues. Any help would be appreciated? Thanks, mvhs1073933
  2. M

    BeforeSave event to bring user to a specific Worksheet not working

    I'm currently using a keybind to suppress messages about document inspector and then save using the following code Sub Remove_Information_Save() 'Macro Activates when CTRL+S is used Application.DisplayAlerts = False ActiveWorkbook.RemovePersonalInformation = True...
  3. M

    BeforeSave Check two ranges cancel if one is empty and the other not

    Hi, I'm fairly new to vba and have been trying to create a sub that when the workbook is saved it checks two different ranges. If either one is empty and the other has a value in it cancel save and display a msg. if both are empty or both have values continue with save. The workbook has a master...
  4. D

    BeforeSave loops and workbook closes

    Hello - I am attempting to save a "copy" of a workbook by forcing a set path and filename. The following code does two things that I would like to avoid. First, the "message" is displayed twice. Why is this occurring and how can I prevent it? Second, the workbook closes after the save...
  5. N

    Deleting Comments and Highlights upon saving a workbook

    I have a workbook to which I want to have a beforesave run in which I delete both comments and highlights, I have not been able to achieve it in the last few weeks, I've searched for possible solutions among other co workers, I was suggested the tracking system inside excel but this is a...
  6. B

    Sheet specific macroing

    Hello I've been having trouble with one of the macros I have set up through VBA. There are 3 macros (all which are practically the same) for 3 different sheets on the same excel file. I was wondering what I should add to my code of what I should do to make my code work. It works if I put it in...
  7. mrMadCat

    VBA different BeforeSave for Save and Save As

    Hello, I need a macro to act differently on events Save and Save As. There is Workbook.BeforeSave functionality in VBA, but is there something like BeforeSaveAs? Or is there a way around? Thank you.
  8. E

    VBA Workbook.Save in BeforeSave fails when file is shared. Why?

    Hi guys, I have a mystery which I'm hoping someone will help me solve. I have a workbook which needs to be shared. It relies heavily on VBA functionality. In order to avoid save conflicts in certain specific cells which don't need to be saved (custom search boxes, stats dropdowns etc) I built...
  9. L

    IsBlank function run on form will not allow initial save of bank value to send to users

    I am having an issue with a similar request. I need to send my excel sheet to the user with blank cells to be filled in. Once the user opens this book I need to prevent the user from being able to save the workbook without the specified cells filled in. (This portion I have code that works for...
  10. S

    Save a copy of a workbook when saving active version

    Hi All, I think I'm going about this right but there's just something slightly wrong with my code.. I'm trying to have excel save a copy of my workbook to a specific directory when the active file is saved. Here's what I have.. Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel...
  11. D

    Excel AutoFilter & beforeSave Problem

    Hello, I have the following problem: I have got a tool that automatically requests data from a database via an ODBC-interface and puts them in an excel template. I also added a macro into that template that is triggered with the beforeSave event and should run after the excel file is filled...
  12. A

    BeforeSend event / Before Send event - Can anybody help me?

    Hi I've a macro file which is a request form. I've programmed it in the BeforeSave event so that User cannot save if mandatory fields are incomplete before e-mailing to me. Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) 'This event will trigger a...
  13. A

    Macro to force save as

    OK...this I've managed to create a macro that does the following: - If the file type is xlsm, only allow the user to save as an xlsm - If the file type is any other type (this will only be xltm), prompt for a password; - If the password is correct, allow the user to save as any file type (I will...
  14. H

    prevent saving in .XLSX format

    Some of my co-workers have Excel 2003 while others have 2010, and both groups need to use some files with necessary macros and udfs. [Tangent: yes, I know these could be in separate add-ins, but IT has kittens about add-ins but not about VBA modules in regular workbooks.] For the time being...
  15. I

    SaveCopyAs in password protected macro

    I have a workbook named 'File1_PA0.xls' and in it is my macro 'macro1'. Upon opening the workbook, 'macro1' saves a copy (SaveCopyAs) of 'File1_PA0.xls' naming it 'File1_PA1.xls' (i.e. stepping the version number up by one). From this point on, any 'save' event on my PA0 version will...
  16. F

    Can't get global VBA macro to work globally

    I'm trying to use a VBA macro to prefill the save dialogue box with the date, anytime ANY workbook is saved. The code (pasted below) is only working for the workbook containing the VBA code. I've tried inserting the code into my Personal Macro Workbook, and also saving and loading it as an...
  17. R

    Save file only if filename is not equal to a specific name

    Hello I have created a worksheet as a template in Excel 2003 and I don't want it to be altered. The idea is that the user should only be able to save the file if they change the filename to something else other than "template.xls". They should still however be able to fill in cells and run...
  18. S

    Can I prevent a BeforeSave macro from running (not even start)

    Hi, I need to run a macro that closes a workbook and that workbook has a BeforeSave macro, can I prevent the BeforeSave macro from running? I do not want it to even start because that interrupts my macro. Thanks for your help.
  19. M

    Issue with XLS & Sharepoint

    I have an issue where I am saving a file with Custome properties to sharepoint. Requirements: 1. Template open from the SharePoint site with a default name, user inputs the information in the XLS. 2. User clicks on Save button, or Clicks on cancel. If clicks on cancel, should be prompted to...
  20. D

    Workbook_BeforeSave Not executing commands

    Please help. I'm fairly new to VBA. and I cant seem to figure out why my code isn't working. If I save manually, the Workbook_beforesave macro executes just fine. However If my macro calls to save, the beforesave macro doesn't execute any of the code at all! I step into and it just acts like its...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back