Results 1 to 3 of 3
  1. #1
    Dave_D's Avatar
    Dave_D is offline Advanced Beginner
    Windows XP Access 2010 64bit
    Join Date
    Aug 2015
    Posts
    67

    Excel formula is causing Access to prompt a save message


    The title may sound strange but here's the scenario. Access opens and reads in my Excel file just fine. When EOF, it prompts whether or not to save the excel. The excel is designed with a Worksheet_BEFORECLOSE which performs a final calculation before closing, by computing the average score for those cells which contain a value. This VBA formula also works fine independently. The Excel is also designed with a WORKSHEET_CHANGE. What I feel what is happening, is that either the BEFORECLOSE or CHANGE is occurring when Access is trying to close the file. I have not found a viable solution for this; so right now the VBA formula in Excel is comment out.

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Sorry, not enough info to give a good response.

    Would need to see the dB and the Excel workbook, or post the code for both Access and the Excel events........

  3. #3
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,793
    Wondering if the standard prompt you get when closing some xl workbooks (with formulae) has anything to do with it. You say the xl code runs fine, presumably when opened manually, so I'd guess that the lack of a delay in Access, which would allow xl to finish before Access attempts the next step, could be the problem. To be honest, I never bothered to master pauses with Do Events since it seems to be less than perfect. If bypassing the problem xl code only when Access is using the file is a possible work around, then you might be able to use a custom trigger in a shortcut command line switch to assign a value to the Command property of a db (I assume this is also possible with a workbook).

    This value comes from the shortcut switch only if the shortcut is used to open the db. If it's there, you make code execution go one way, another if not.
    Last edited by Micron; 05-24-2017 at 08:43 PM. Reason: clarification
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 19
    Last Post: 07-13-2015, 10:15 AM
  2. Replies: 41
    Last Post: 05-29-2015, 02:58 PM
  3. Replies: 5
    Last Post: 12-16-2014, 10:01 AM
  4. Replies: 7
    Last Post: 03-27-2014, 11:47 AM
  5. suppressing save message from access to excel charting
    By g4tv4life in forum Programming
    Replies: 3
    Last Post: 03-18-2014, 02:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums