I am trying to write some VBA so create a save as button that saves the document into the correct location and creates the correct file name... I am a bit of a VBA noob, I can do basics but this has me stumped! Please see the code below that I have tried to butcher from various different sources. Apologies in advance for the crap code, I know this will be easy for some of you guys to fix:
Code:
Private Sub CommandButton2_Click()
Dim fsName As String
Dim fName As Variant
Dim path As String
fsName = Range("A2").Value
fName = ("ABC123" & fsName)
path = ("bwg-apps01\cash4w\cabinet\Sales Enquiry\000" & fsName & "\001 Cost Sheet\")
ActiveWorkbook.SaveAs Filename:=(path & fName), FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
End Sub