The following code is designed to save an excel file by naming it whatever is in cell B1 & today's date to the specified directory. The code stops at the line colored red and returns a "RUN-TIME ERROR 429 - ActiveX COMPONENT CAN'T CREATE OBJECT". I am assuming a missing dll or something in Tools - References not being checked, but dunno how to fix dll or what needs to be checked in References. Any help would be much appreciated.
==============================================
Sub SaveAs()
Dim Filename As String
Filename = Sheets("MODEL").Range("B1").Text
Filename = Filename & " " & Format(Date, "yyyy-mm-dd") & ".xlsm"
Path = "C:\Users\Name\Documents\Save Here\Results\"
ThisWorkbook.SaveAs Path & Filename
End Sub
==============================================
Sub SaveAs()
Dim Filename As String
Filename = Sheets("MODEL").Range("B1").Text
Filename = Filename & " " & Format(Date, "yyyy-mm-dd") & ".xlsm"
Path = "C:\Users\Name\Documents\Save Here\Results\"
ThisWorkbook.SaveAs Path & Filename
End Sub
Last edited: