Results 1 to 2 of 2
  1. #1
    Join Date
    May 2019
    Posts
    65

    Using ActiveWorkbook.SaveAs

    Hi,
    I am using the following code "segment" in one Excel Workbook to save over an existing ExcelReady.xls file. If I run this code in Excel, when it get's ready to save it prompts me as to whether or not I want to write over the existing file and I click on Yes. Everything thing works in the VBA code.

    Now when I Run the Excel Macro from Access it stops when it is going to overwrite and doesn't allow me to continue. If I hit escape, then it comes up with a message to Switch and then it seems to work.

    So, I've tried adding some arguments to SaveAs code but nothing works.

    Here is the code I'm using. I want it to automatically overwrite the ExcelReady.xls file.



    ActiveWorkbook.SaveAs fileName:="V:\Excelready.xls", FileFormat:= _
    xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
    , CreateBackup:=False
    ActiveWorkbook.Save

    Any help is appreciated.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Saveas Dialog Box With .xlsx As Filetype
    By Manish_05 in forum Import/Export Data
    Replies: 7
    Last Post: 05-07-2014, 12:16 PM
  2. Replies: 2
    Last Post: 10-26-2012, 01:18 PM
  3. Saveas function
    By reidn in forum Programming
    Replies: 7
    Last Post: 07-20-2011, 08:42 AM
  4. saveas in access vba
    By philfer in forum Programming
    Replies: 2
    Last Post: 05-20-2010, 12:02 PM
  5. SaveAs Dialogue box
    By saqqer in forum Programming
    Replies: 8
    Last Post: 09-10-2009, 10:49 AM

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