+ Reply to Thread
Results 1 to 2 of 2

Run time error 1004

  1. #1
    Registered User
    Join Date
    07-20-2009
    Location
    england
    MS-Off Ver
    Excel 2003
    Posts
    12

    Run time error 1004

    Hi, i have ritten some code t save an xlsm file as an xlsx file. It was working fine then all of a sudden started giving the error 'Run-time error '1004': Method 'SaveAs' of object'_Workbook' failed.

    It does create and save the file in xlsx format but throws up the above message.

    Please Login or Register  to view this content.
    Any help would be greatly apreciated.

  2. #2
    Forum Expert CheeseSandwich's Avatar
    Join Date
    12-22-2021
    Location
    Kent, England
    MS-Off Ver
    365 - 2404-17531.20128
    Posts
    1,362

    Re: Run time error 1004

    Usually when you use saveas you would define a path to save the file to. In your code above you are saving the file as just a file name. You need to include the path to the save location as well as the name to save the fle as.

    For example:
    Please Login or Register  to view this content.
    If things don't change they stay the same

+ 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] I am getting error as "Run Time error '1004' Microsoft excel cannot paste the data
    By Amittapre in forum Excel Programming / VBA / Macros
    Replies: 43
    Last Post: 03-24-2017, 04:40 PM
  2. [SOLVED] Sort Macro Run-time error '1004': Application/Object-defined error.
    By sam1212 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-22-2014, 10:05 AM
  3. Addon error : Run-time error '1004': Method 'MacroOptions' of object '_Application' failed
    By jtcoleman in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 3
    Last Post: 02-05-2014, 12:23 PM
  4. Replies: 4
    Last Post: 11-15-2013, 05:03 PM
  5. VBA Code...error = run time error 1004 autofilter method of range class failed
    By Dariusd7 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-15-2013, 04:49 PM
  6. Error "run-time Error '1004': General Odbc Error
    By D4WNO77 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-16-2012, 09:55 AM
  7. Replies: 5
    Last Post: 08-10-2005, 05:05 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