SlinkRN
Well-known Member
- Joined
- Oct 29, 2002
- Messages
- 711
Hi,
I want to create a macro that will allow the user to enter a month, day, and year into a userform and then use those variables in the pathway to save as a new file.
I figured it out with the variables, but I can't figure out how to put spaces between the variables.
Here's the code I have that saves it without spaces:
path = "C:\Documents and Settings\Compaq\Desktop\"
activeworkbook.saveas filename"= _
path & "Sched beg" & txtmonth & txtday & txtyear.fileformat:=xlnormal
I tried adding & " " between the variables but that doesn't work.
Thanks, Slink
I want to create a macro that will allow the user to enter a month, day, and year into a userform and then use those variables in the pathway to save as a new file.
I figured it out with the variables, but I can't figure out how to put spaces between the variables.
Here's the code I have that saves it without spaces:
path = "C:\Documents and Settings\Compaq\Desktop\"
activeworkbook.saveas filename"= _
path & "Sched beg" & txtmonth & txtday & txtyear.fileformat:=xlnormal
I tried adding & " " between the variables but that doesn't work.
Thanks, Slink