Results 1 to 3 of 3

Disable on open event

Threaded View

PLD60 Disable on open event 02-01-2017, 05:52 PM
JBeaucaire Re: Disable on open event 02-01-2017, 05:56 PM
PLD60 Re: Disable on open event 02-01-2017, 06:52 PM
  1. #1
    Registered User
    Join Date
    12-13-2013
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    78

    Disable on open event

    I have a workbook that the on open event opens a form. This works great. This form is only needed the first time the workbook is opened. I have a macro that runs the following save as code
    Sub Macro2()
        Dim newFile As String, fName As String
        
        fName = Range("M1").Value
        newFile = Format$(Date + 1, "mm-dd-yyyy") & fName
         ChDir _
        "H:\Spreadsheets\Unit Reports\"
        ActiveWorkbook.SaveAs Filename:=newFile
        
        
    End Sub
    This saves the workbook just like I want. The issue is on the "new" workbook I do not want the form to open, on open (it is not needed) I tried this code at the end of my save as event trying to disable the On Open Event. Did not work.

    any ideas?

    Application.EnableEvents = False
    Last edited by PLD60; 02-01-2017 at 06:03 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Disable Workbook Open Event Until Other Code has finished Executing
    By dgdgdg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-08-2013, 05:36 AM
  2. Disable Worksheet_Change event while looping
    By thomasrawley in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-06-2006, 06:31 PM
  3. [SOLVED] Disable SelectionChange Event
    By BillCPA in forum Excel General
    Replies: 2
    Last Post: 02-17-2006, 02:50 PM
  4. [SOLVED] Disable Click event
    By Ashman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-22-2005, 03:05 PM
  5. [SOLVED] Disable event macro while Auto_open() run
    By Sunil Patel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-30-2005, 02:05 PM
  6. [SOLVED] HOW TO DISABLE ALL MACROS in BeforeClose event handling procedure
    By Intellihome in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-14-2005, 11:05 AM
  7. Disable saving in BeforeClose event
    By Franck in forum Excel General
    Replies: 2
    Last Post: 04-15-2005, 05:06 AM
  8. [SOLVED] Remove/disable event macros in SavedAs wkbk?
    By Ed in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-22-2005, 10:06 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