Consulting

Results 1 to 3 of 3

Thread: New Issue with SaveAs

  1. #1
    VBAX Regular
    Joined
    Nov 2014
    Location
    Idaho
    Posts
    36
    Location

    New Issue with SaveAs

    This part of my script has been working for almost a year now, but it's failing with "run-time error '1004': incorrect function - ActiveWorkbook.SaveAs" now.

    Public Sub VendorRecon()
    '
    '   This section prepares the yyyy Mmm - Vendor Recon File.xlsx
    '
        Call openxmlfile
        Call borders
        Call SSN
        Call USD
        Call dates
        Call FName
        Call LName
        Call freeze
        year_Month = Format(DateAdd("m", 1, Date), "yyyy mmm")
        yearMonth = Format(DateAdd("m", 1, Date), "yyyymmm")
        Sheets("Sheet1").Select
        Sheets("Sheet1").Name = "" & year_Month & " - Vendor Recon File"
        With ActiveSheet.PageSetup
            .Orientation = xlLandscape
        End With
        ActiveWorkbook.SaveAs Filename:= _
            "\\san\ppc\vendors\Forms and Files\2014\" & year_Month & " \ " & year_Month & " - Vendor Recon File.xlsx" _
            , FileFormat:=51, Password:="", WriteResPassword:="", CreateBackup:=False
    The hang up is in the last section. Any clues?
    Thanks.
    Last edited by netwerkz; 11-25-2014 at 09:50 AM. Reason: more information

  2. #2
    VBAX Contributor
    Joined
    Jun 2015
    Location
    Houston
    Posts
    111
    Location
    Has the Folder name and /or path been changed?

    For example: Does it still say 2014? or is it now 2015?
    Thanks.

    Lord Dragon

    "Discovery consists not in seeking new lands, but in seeing with new eyes." ~ Marcel Proust

  3. #3
    VBAX Regular
    Joined
    Nov 2014
    Location
    Idaho
    Posts
    36
    Location
    This question has been resolved. Thanks to all contributors!!! netwerkz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •