LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save a worksheet by itself to a new file Rich Excel Discussion (Misc queries) 2 December 9th 08 03:01 PM
Convert and save a worksheet as a PDF file Rob Excel Programming 1 November 20th 07 09:52 PM
Save data entered into UserForm to be Edited later RyanH Excel Programming 8 November 15th 07 06:43 AM
Save a worksheet as an Htm file Neil[_14_] Excel Programming 1 April 29th 04 06:33 PM
How to save each worksheet as seperate file? Henri Excel Programming 2 February 23rd 04 10:11 PM


All times are GMT +1. The time now is 01:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"