Save a worksheet as it's own workbook with the file name using a number from within a cell

JAB331

New Member
Joined
Jan 11, 2018
Messages
6
Hi All,

I have created a report template that is populated when people enter data using a userform. It is working as i would like andwhen data is submitted the report template is populated correctly. Now i would like to add a command button to this report template so people can save each populated report as its own individual workbook with the file name being the "part number" and "tool number" which is in cells T3 and T5.

This the data entry/template workbook is never changed but all the reports that are created using the data entry form are saved seperately with easily identifiable names.

Thanks for any help in advance.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Something like this....

Code:
Sub CreateNewFile()
    Application.Dialogs(xlDialogSaveAs).Show _
        ActiveSheet.Range("T3").Value & " " & ActiveSheet.Range("T5").Value & ".xlsm"
End Sub
 
Upvote 0
Something like this....

Code:
Sub CreateNewFile()
    Application.Dialogs(xlDialogSaveAs).Show _
        ActiveSheet.Range("T3").Value & " " & ActiveSheet.Range("T5").Value & ".xlsm"
End Sub

How would i specify a folder for the files to be saved in?
 
Upvote 0
Any other advice from anyone?

The code suggested saves the whole workbook as the name i require but i only need to save one work sheet (named Report Template) as a separate workbook every time and i would like to choose set the folder the files will be saved in using the code also.

Thanks.
 
Upvote 0

Forum statistics

Threads
1,223,956
Messages
6,175,616
Members
452,661
Latest member
Nonhle

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top