I'm trying to save a workbook as a different name, where the name of the workbook is the value of a form textbox.
Here's the code that I've pieced together, but I'm getting an "Expected = " error on the line in red font.
Here's the code that I've pieced together, but I'm getting an "Expected = " error on the line in red font.
Code:
Private Sub cmd_Submit_Click()
Dim ws2, ws3 As Worksheet
Dim CS As Workbook
Dim CSPath As String
Dim CSFName As String
Set ws2 = ThisWorkbook.Sheets("Summaries")
Set ws3 = ThisWorkbook.Sheets("Bios")
Set CSPath = "C:\Users\Rodger\Desktop\Bodies by Trish\"
Set CS = Workbooks.Open("C:\Users\Rodger\Desktop\Bodies by Trish\CS_Template.xlsm")
Set CSFName = Me.txt_ClientID
CS.Sheets("Bio").Range("E2").Value = Me.txt_ClientID.Value
CS.Activate
[COLOR=#ff0000]activeworkbook.SaveAs (Filename:="CSPath & CSFName",FileFormat:=52)[/COLOR]
End Sub