View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Steve[_116_] Steve[_116_] is offline
external usenet poster
 
Posts: 3
Default Creating Path and FileName

Hello,
I am tryin to create a filename and path using Input boxes....

Sub MySub()
Dim UserInput1 as string
Dim UserInput2 as string

UserInput1=inputbox("Enter Data")
UserInput2=inputbox("Enter Some Moredata"

activeWorkBook.SaveAs Filename:="C:\Mypath"&UserInput1&"\UserInput1 _
&"-"UserInput2&".xlsm",FileFormat:=xlOpenXMLWorkbookM acroEnabled,
CreateBackup:=False

But Im getting "expected End of Statement" on the "\"

What am I doing wrong?

Thanks