Macro VBA

Closed
ka_8919 Posts 1 Registration date Wednesday 6 February 2019 Status Member Last seen 6 February 2019 - 6 Feb 2019 à 10:07
 Blocked Profile - 6 Feb 2019 à 10:57
I have a macro that saves my file to a specific folder. However, when I save the file it adds in text that should not be there

Sub Save_FileName_BillTO_ShipTO()
Dim Path As String
Dim filename As String
Path = "C:\Users\kyla.henry\Brown\Business Intelligence - Documents\Reports\02_Customers"

filename = " " & "December" & " " & Range("B2") & " " & Range(" A2") & " Monthly Usage BT ST"


ActiveWorkbook.SaveAs filename:=Path & filename & ".xlsx", FileFormat:=xlNormal
End Sub


For instance it will add 02_Customers to the file name. How do I get rid of that?
Related:

1 response

Blocked Profile
6 Feb 2019 à 10:49
Alter your path variable and remove the last forward slash on....
Blocked Profile
6 Feb 2019 à 10:57
Alter the variable path. It is coded in the variable.