Results 1 to 4 of 4

run time error 1004 method save as of object _workbook failed

Threaded View

  1. #1
    Registered User
    Join Date
    02-20-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    2

    run time error 1004 method save as of object _workbook failed

    Hi trying to run this code and I get the error message 1004

    Can anyone tell me what I am doing wrong?

    Sub SaveInvWithNewName()
        Dim NewFN As Variant
        Dim sfile As String
        ' Copy Invoice to a new workbook
        ActiveSheet.Copy
        NewFN = "C:\Documents and Settings\Owner\My Documents\Accounts" & Range("I1").Value & ".xls"
        ActiveWorkbook.SaveAs NewFN, FileFormat:=xlExcel8
        ActiveWorkbook.Close
    End Sub
    Last edited by arlu1201; 02-20-2013 at 02:41 PM. Reason: Use code tags in future.

Thread Information

Users Browsing this Thread

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

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