View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
dksaluki dksaluki is offline
external usenet poster
 
Posts: 48
Default Userform Save data To Worksheet & File

Here is some code to get you basically what you want. Instead of hard
coding the string names, you could replace with
Me.TextBox1.Value or whatever your case is.

Sub addfilefolder()
Dim folderPath As String
Dim fileName As String

folderPath = "C:\Users\kurtz\Desktop\test"
fileName = TextBoxJobNumber.Value & ".xlsx"
Workbooks.Add
MkDir folderPath
ActiveWorkbook.SaveAs Filename:=folderPath & "\" & fileName
Workbooks(fileName).Close

End Sub


Hope this helps
dk