+ Reply to Thread
Results 1 to 5 of 5

Error 1004 when trying to save file with name generated from cell value

  1. #1
    Registered User
    Join Date
    08-31-2015
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    2

    Question Error 1004 when trying to save file with name generated from cell value

    I wrote a workbook that automatically generated a weekly report from Access data, created a new workbook with just the report then saved the new workbook with a name generated from text and a cell value (the date).

    This worked fine in Excel 2007, now the charity I help has upgraded to Office 2013 and the macro now generates a 1004 error
    "Microsoft Excel cannot access the file
    'C:\Dellsys\WeeklyReports\BECCD000' "

    The BECCD000 changes each time I try to run the macro, but FName2 is still picking up the correct cell value, see the code below.

    Please Login or Register  to view this content.
    Anyone aware of any 2013 problems that will cause this?
    Last edited by Terios1951; 09-16-2015 at 09:57 AM. Reason: Missing code tags

  2. #2
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Pakistan
    MS-Off Ver
    2013, 2016
    Posts
    283

    Re: Error 1004 when trying to save file with name generated from cell value

    Put this at the start of code and then See. Maybe It works.
    Please Login or Register  to view this content.
    Don't wait for the PERFECT MOMENT
    take the moment and make it PERFECT
    Amir

  3. #3
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Error 1004 when trying to save file with name generated from cell value

    Terios1951,

    Welcome to the board.

    Unfortunately:
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    Click the * Add Reputation button in the lower left hand corner of this post to say thanks.

    Don't forget to mark this thread SOLVED by going to the "Thread Tools" drop down list above your first post and choosing solved.

  4. #4
    Registered User
    Join Date
    08-31-2015
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    2

    Re: Error 1004 when trying to save file with name generated from cell value

    Ooops sorry about that. Will know in future.

  5. #5
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Error 1004 when trying to save file with name generated from cell value

    Quote Originally Posted by Terios1951 View Post
    Ooops sorry about that. Will know in future.
    Why don't your fix it anyway. It's a 20 second fix. Click edit on your first post, highlight the code, click the # and save the post again.

+ 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. Runtime error 1004 when trying to save file via VBA
    By avh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-09-2015, 03:20 AM
  2. [SOLVED] Run-time error 1004/Save file macro
    By egglee in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-04-2013, 06:22 AM
  3. Error 1004 with save button
    By koconn in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-04-2013, 09:55 AM
  4. SaveCopyAs Runtime Error 1004 - save a backup without altering open file
    By kamelkid2 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-27-2013, 08:11 PM
  5. Run-time error 1004 on macro generated code
    By BGiffin2004 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-25-2011, 11:01 AM
  6. Save generated xml file to a web folder with user name and password
    By skumaar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-17-2010, 12:02 PM
  7. Error # 1004 was generated by Microsoft office Excel
    By johnson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-17-2008, 12:56 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