Saving File with information from Text Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have several text boxes in a user form and I want to use information from
those text boxes as part of the file name. For example:
TextBox1\TextBox2.xls. How do I get the data from the text boxes to be
recognized by excel so it will save the file?
 
Dim sStr1 as String, sStr2 as String
sStr1 = Userform1.Textbox1.Text
sStr2 = Userform1.Textbox2.Text

ActiveWorkbook.SaveAs sStr1 & "\" & sStr2 & ".xls"

You also might want to look at GetSaveAsFileName
 
Back
Top