I have a 3 Macros in a workbook that are pulling tabs, pasting the information as values, auto populating the file name, and saving the file to same file path.
All three are identical, except for the tabs that are pulled from the file.
I continue to get a runtime '9' error when it gets to the input function I have set up. The debugger takes me to the script that triggers the save file name. The only difference in the code I have in this one that is different from the other two, is the cell reference that the name of the file is being pulled from. Code below.
Can anyone see why this code would result in this error? I am at a head scratching moment here, since I have identical Macros that do almost exactly the same thing, and function without error.
All three are identical, except for the tabs that are pulled from the file.
I continue to get a runtime '9' error when it gets to the input function I have set up. The debugger takes me to the script that triggers the save file name. The only difference in the code I have in this one that is different from the other two, is the cell reference that the name of the file is being pulled from. Code below.
Can anyone see why this code would result in this error? I am at a head scratching moment here, since I have identical Macros that do almost exactly the same thing, and function without error.
Code:
' Input box to name new file
NewName = InputBox("Name of your New Price Packet Schedule " & vbCr & _
"Recommended Format:" & vbCr & _
" " & vbCr & _
"YYYY-MM-DD_Client Name - Pursuit Type_ID_Price File_vX.XX" & vbCr & _
" " & vbCr & _
"EX: 2015-05-25_ZYX Inc - ITO_4321234_Price File_v1.23", "New Copy", Worksheets("Opportunity").Range("I185").Value)
' Save it with the NewName and in the same directory as original
ActiveWorkbook.SaveCopyAs ThisWorkbook.Path & "\" & NewName & ".xlsx"
ActiveWorkbook.Close SaveChanges:=False
.ScreenUpdating = True
End With
Exit Sub