Hello,
I keep getting this error when my macro hits the "saveas" point. I've spent hours trying to figure out what's wrong. Any idea's?
I also tried ActiveWorkbook as well, no luck.
I keep getting this error when my macro hits the "saveas" point. I've spent hours trying to figure out what's wrong. Any idea's?
Code:
Sub FormatTagExpiration()
'
' This macro opens specific workbooks to "clean" them up for processing them into a summary workbook.
'
Dim src As Workbook
Set src = Workbooks("313670 Avanir Biweekly Dashboard Report.xlsm")
'Below set a CELL reference to the("313670 Avanir Biweekly Dashboard Report.xlsm") workbook.
'The numbers below refer to row number and column number respectivly. (33, 4) 33= row, 4 = column.
Dim cellValueFolderName As String
Dim cellValueFolderName1 As String
cellValueFolderName = src.Worksheets("Data").Cells(168, 2) 'New folder name.
cellValueFolderName1 = src.Worksheets("Data").Cells(168, 1) 'New folder name without the slash.
'Below goes back to "Template.xlsx" and does a saveas.
Windows("Template.xlsx").Activate
Application.DisplayAlerts = False ' suppress overwrite warning message
ThisWorkbook.SaveAs Filename:="\\fleet.ad\data\Data1\VMSSHARE\FS\FPSCOEASSO\Temporary Fleet Reports\313670 Avanir\Final Result\" & cellValueFolderName & "313670 Avanir Biweekly Dashboard " & cellValueFolderName1 & ".xlsx"
Application.DisplayAlerts = True
End Sub
I also tried ActiveWorkbook as well, no luck.