+ Reply to Thread
Results 1 to 4 of 4

method saveas of object _workbook failed

  1. #1
    Registered User
    Join Date
    11-21-2014
    Location
    bangladesh
    MS-Off Ver
    2013
    Posts
    33

    Angry method saveas of object _workbook failed

    Hello Excel Expert

    I am trying to create a macro, which will do some task and save a new excel file.
    but in line
    Please Login or Register  to view this content.
    I am getting an error method saveas of object _workbook failed

    Note: This code is working fine someone else PC but not working for me whereas windows and excel version is same (Windows 10 and Excel 2016).

    Here is the code I am using:
    Please Login or Register  to view this content.

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

    Re: method saveas of object _workbook failed

    Using Date will cause the file name to include the date written as 3/9/2018. It is illegal to have slashes in a Windows file name, and that is why you are getting the error.

    Try something like this:

    Please Login or Register  to view this content.
    By the way you also have to ensure that itm does not contain illegal characters.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    11-21-2014
    Location
    bangladesh
    MS-Off Ver
    2013
    Posts
    33

    Re: method saveas of object _workbook failed

    Thank you sir,
    It works perfectly.
    Thanks a lot.....!

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

    Re: method saveas of object _workbook failed

    You're welcome! Thanks for the rep, and thanks for marking your thread Solved!

+ 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] run into 1004 error "method 'saveas' of object '_workbook' failed" when saving wb copy
    By tadaw in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-10-2017, 06:18 AM
  2. run time error 1004 method saveas of object _workbook failed (help)
    By Cbirchfi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-28-2016, 04:03 PM
  3. Replies: 0
    Last Post: 06-08-2015, 01:14 AM
  4. [SOLVED] Runtime Error '1004' Method 'SaveAs' of object'_Workbook Failed
    By Angsome in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-12-2014, 02:58 PM
  5. [SOLVED] Run Time Error 'SaveAs' of object'_Workbook Failed
    By vaibhav2312 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-07-2014, 07:17 AM
  6. Run Time Error '1004': Method 'saveas' of object '_workbook' failed
    By vcuphysics in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-21-2012, 04:50 PM
  7. [SOLVED] method 'SaveAs' of object '_Workbook' failed
    By Kishi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2006, 10:55 PM

Tags for this Thread

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