Hi Guys,
I am using Excel 2016. I have the following input fields :
[TABLE="width: 251"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Sales Person[/TD]
[TD]Jack[/TD]
[/TR]
[TR]
[TD]Customer[/TD]
[TD]Apple Inc[/TD]
[/TR]
[TR]
[TD]Project[/TD]
[TD]Glass[/TD]
[/TR]
</tbody>[/TABLE]
I am trying to setup a macro that will save my excel file to a specific folder name base on the sales person name. So if the sale's person name is Jack it would go to Jack folder. If its John it will save to John folder etc.
I did abit of googling and found the code to save to a folder but wasn't able to find one that had a dynamic save location :
Sub TestSave()
Dim FName As String
Dim Fname2 As String
Dim Fname3 As String
Dim FPath As String
FPath = "C:\Desktop\Jack/"
FName = Range("B1")
Fname2 = Range("B2")
Fname3 = Range("B3")
ActiveWorkbook.SaveAs Filename:=FPath & FName & " " & Fname2 & Fname3 & ".xls", FileFormat:=xlNormal
End Sub
Any idea's how I can make it dynamic such that it would save to the specific folder base on the cell input of Cell B1 ?
Thank you
I am using Excel 2016. I have the following input fields :
[TABLE="width: 251"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Sales Person[/TD]
[TD]Jack[/TD]
[/TR]
[TR]
[TD]Customer[/TD]
[TD]Apple Inc[/TD]
[/TR]
[TR]
[TD]Project[/TD]
[TD]Glass[/TD]
[/TR]
</tbody>[/TABLE]
I am trying to setup a macro that will save my excel file to a specific folder name base on the sales person name. So if the sale's person name is Jack it would go to Jack folder. If its John it will save to John folder etc.
I did abit of googling and found the code to save to a folder but wasn't able to find one that had a dynamic save location :
Sub TestSave()
Dim FName As String
Dim Fname2 As String
Dim Fname3 As String
Dim FPath As String
FPath = "C:\Desktop\Jack/"
FName = Range("B1")
Fname2 = Range("B2")
Fname3 = Range("B3")
ActiveWorkbook.SaveAs Filename:=FPath & FName & " " & Fname2 & Fname3 & ".xls", FileFormat:=xlNormal
End Sub
Any idea's how I can make it dynamic such that it would save to the specific folder base on the cell input of Cell B1 ?
Thank you