PDA

View Full Version : [SOLVED] New Issue with SaveAs



netwerkz
11-25-2014, 08:40 AM
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.

LordDragon
10-06-2015, 01:46 PM
Has the Folder name and /or path been changed?

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

netwerkz
10-08-2015, 12:37 PM
This question has been resolved. Thanks to all contributors!!! netwerkz