+ Reply to Thread
Results 1 to 4 of 4

Runtime error 1004 when trying to save file via VBA

  1. #1
    Registered User
    Join Date
    04-24-2012
    Location
    BE
    MS-Off Ver
    Excel 2007
    Posts
    8

    Runtime error 1004 when trying to save file via VBA

    Hello,

    I'm trying to save a file to a specified folder with a custom filename depending on the contents of certain cells.

    Everything used to work fine, however suddenly I got Runtime error 1004: the specified dimension is not valid for the current chart type whenever the macro gets to the save-routine.

    Code looks as follows:

    To generate the filename:
    Please Login or Register  to view this content.
    And then to save the file:

    Please Login or Register  to view this content.
    The code chokes at ActiveWorkbook.SaveAs fileSaveName, FileFormat:=xlOpenXMLWorkbookMacroEnabled.

    Does anyone have any idea what may cause this problem? Note that a chart appears in the worksheet, but I don't refer to it anywhere in the code...

  2. #2
    Valued Forum Contributor Parth007's Avatar
    Join Date
    12-01-2014
    Location
    Banglore
    MS-Off Ver
    2010
    Posts
    879

    Re: Runtime error 1004 when trying to save file via VBA

    Just to move one step ahead error.. u can use

    Please Login or Register  to view this content.
    Regards
    Parth

    I appreciate your feedback. Hit * if u Like.
    Rules - http://www.excelforum.com/forum-rule...rum-rules.html

  3. #3
    Valued Forum Contributor Parth007's Avatar
    Join Date
    12-01-2014
    Location
    Banglore
    MS-Off Ver
    2010
    Posts
    879

    Re: Runtime error 1004 when trying to save file via VBA

    Just to move one step ahead error.. u can use

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-24-2012
    Location
    BE
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Runtime error 1004 when trying to save file via VBA

    Thanks; I'm aware of that trick.

    However I would like to know what causes this error rather than ignoring it...

+ 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] Save as PDF, choosing path, runtime error 1004
    By mikkelsl in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2014, 12:27 PM
  2. [SOLVED] runtime error 1004 method save of object _workbook failed
    By madhatter40 in forum Excel General
    Replies: 1
    Last Post: 06-22-2013, 07:30 AM
  3. [SOLVED] runtime error 1004 method save of object _workbook failed
    By madhatter40 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-20-2013, 03:37 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. Runtime Error 1004 : file could not be accessed
    By deepyogi in forum Excel General
    Replies: 1
    Last Post: 07-24-2009, 11:54 AM
  6. [SOLVED] Runtime error 1004/ Save As method help
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-17-2006, 12:00 AM
  7. File Name Causes Runtime Error 1004
    By Robert in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-10-2005, 10:55 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