Hi, I have a macro that brings up a dialog box asking the user what they would like to name the file:
Dim MyInput
MyInput = InputBox("What would you like to name the file? i.e. BT Report 10_12_11")
Dim FN As String
FN = MyInput
ActiveWorkbook.SaveAs Filename:=FN & ".xls"
I have previously directed things to a specific folder like this:
Dim FP As String, FN As String
FP = "W:\Planning\"
FN = MyInput
ActiveWorkbook.SaveAs Filename:=FP & FN & ".xls"
What I want to do now is have a second input box for the user to select the folder at the end of a specific path. What I tried was:
Dim MyInput
MyInput = InputBox("What would you like to name the file? i.e. BT Report 10_12_11")
Dim MyInput2
MyInput2 = InputBox("Which folder would you like to save to?")
Dim FP As String, FN As String
FP = "W:\Planning\" & MyInput2
FN = MyInput
ActiveWorkbook.SaveAs Filename:=FP & FN & ".xls"
I have it wrong somewhere but I can't figure out where. Can anyone suggest a way of doing this? (the folders will always be in W:\Planning)
Thanks,
Dean
Bookmarks