-2

I have a spreadsheet that I'm using as a template to get user input. When you press the submit button on the spreadsheet, it sends the data to a different workbook that stores all the previous entries and then clears the template. Is there a way to save the template as a different file when you push the button? I know about .Saveas(), but I want a file name that's based off what was typed in cell A2 and B2?

tshepang
  • 12,111
  • 21
  • 91
  • 136
Bolo
  • 13
  • 1
  • 1
  • 2

1 Answers1

2

I do this on a daily basis saving the file as the previous days date. I modified what I use for what you are wanting:

dim name as string

name = Cells(1,2).Value & Cells(2,2).Value

ActiveWorkbook.SaveAs() Filename:=name
Jacob Lambert
  • 7,449
  • 8
  • 27
  • 47
  • I knew it was going to be simple. I just couldn't think of how to do it. Thank you! – Bolo Feb 20 '14 at 12:08