before save events

  1. G

    How do I make a macro only affect a single worksheet?

    I have some code that I took from a different Forum post which I've put below. I'm wanting to make it only apply to a specific worksheet names "New Hire Form". Can anyone adjust this do only happen if "New Hire Form" is the selected sheet? Also, do I put it in the "thisworkbook", Sheet, or...
  2. C

    VBA Email when save problems! Need help with attachments and multiple email address'

    I have this code in VBA which currently works perfectly fine but I want to add to it and cant seem to get my head around it. As it stands, when you press save on the workbook it automatically sends an email to the email address in the code stating the date and time the work book was updated...
  3. K

    Issues with Saveas on activeworkbook

    I have the following VBA code in a before save event ' check if file exists. if yes save else saveas Application.EnableEvents = False If Len(Dir(FullName)) > 0 Then ActiveWorkbook.Save Else ActiveWorkbook.SaveAs FileName:=FullName, AddToMru:=True End If...
  4. J

    Save by VBA does not trigger Save Event

    I have a process that is to be triggered Before Save. Excel 2010 64-bit W7. When I open the workbook manually and request a save from the keyboard it works fine. When the same workbook is opened by another workbook and saved by that second workbook's VBA code, the Before Save process is not...
  5. R

    Autofilter turn off question

    Hello to all. Have a quick one for everyone to mull over. To start, using Excel 2003 (don't say it, I already know :banghead: ). I have a protected sheet with Autofilter boxes located from A4 to Y4. I need to be able to have a macro check the columns to see if any of the filters are active...
  6. M

    Mandatory Cells Before Saving; IF Statement: Message box problem

    Hi there, I'm new in the forum. Hope some kind soul helps :) I wrote this code without many idea of VBA thanks to the search tool: Private Sub Workbook_BeforeSave(ByVal SaveAsUi As Boolean, Cancel As Boolean) Dim msg As String With Sheets("Form") If WorksheetFunction.CountIf(.Range("C5")...
  7. W

    Require Cell Entry before saving

    (Excel 2007) I have a workbook with several sheets with cells that require user input. Some fields are not that important, but others are very critical. All the critical fields say 'Required', but I still get people returning the workbook with no entry in these fields. I need a before-save macro...
  8. 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...
  9. paipimenta

    Disable Events not preventing crash....

    This was offered as a solution to another's post... http://www.mrexcel.com/forum/showthread.php?t=465898 but I got a bug in it. I've got the following code to save a copy of the current file to another location... (To test this out, I used my Desktop[shared] and My Documents[master] as the two...
  10. 3

    before save/close

    Would like code to not allow save or close if cells P9 through R27 have ? Instead of blank. Thank you for any assistance.

Some videos you may like

This Week's Hot Topics

  • Problem with Radio Button's format control
    I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
  • Last Display on userform to a Listbox
    [CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
  • Rename and move files to a new location
    Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
  • Help with True/False Formula
    Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
  • Clear extra characters from a provided range of cells
    Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
  • Help with Current and highest streaks
    Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...
Top