+ Reply to Thread
Results 1 to 5 of 5

Run-time error '1004': Document not saved

  1. #1
    Registered User
    Join Date
    02-28-2020
    Location
    Davie, Florida
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    3

    Run-time error '1004': Document not saved

    I created a macro to create a pdf from an Excel form. I have 7 co-workers using this form and only 1 person is getting this run-time error. Is there a setting on his computer I am missing? The code is below:

    Please Login or Register  to view this content.
    Last edited by 6StringJazzer; 02-28-2020 at 04:52 PM. Reason: Moderator added code tags

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: Run-time error '1004': Document not saved

    (The ChDir is not necessary since you are using the full pathname for the file.)

    Is the user with the error using the same system configuration as everyone else? My first thought is that this code will not work on a Mac.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    02-28-2020
    Location
    Davie, Florida
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    3

    Re: Run-time error '1004': Document not saved

    He is using the same setup as everyone else, PC not Mac.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: Run-time error '1004': Document not saved

    There is nothing obviously wrong with the code, and if only one user is having a problem, it is an issue in his environment.

    Do people run this code more than once, to replace an existing file with a new one? If so, is it possible he has the file open in a PDF reader at the same time Excel is trying to write it?

    Check the attributes on the file to make sure that Read Only is not checked.

    It may be possible there is a lock on the file even if he doesn't have it open. Has he tried rebooting?

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: Run-time error '1004': Document not saved

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. No help to be offered until the link is provided.)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Once successful VBA now elicits Run-time error '1004': Document not saved.
    By Matthew55 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-31-2017, 12:57 PM
  2. [SOLVED] Runtime Error 1004: Document Not Saved (ExportAsFixedFormat)
    By Sophie.Durrant in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-10-2015, 11:16 AM
  3. Replies: 0
    Last Post: 12-16-2014, 10:12 AM
  4. Run-time error 1004 Document not saved....
    By ey_up in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-18-2014, 04:47 AM
  5. Run-time error '1004': Document Not Saved (while using LockXLS)
    By lottidotti in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-25-2013, 12:14 PM
  6. Excel 2007 : Run Time Error 1004 - Document not saved
    By Villamankh in forum Excel General
    Replies: 2
    Last Post: 12-17-2010, 09:44 AM
  7. [SOLVED] Run-time error '1004'; Document not saved - intermittent
    By Kerry in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-15-2005, 07:15 PM

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