Hello Friends, Welcome to dptutorials.
If you want to save your excel workbook using the text in a specific cell as a filename, you need to watch this tutorial.
Click on the cell B2, enter some text and save it, you can see the file name as same as cell B2.
Let us learn this trick now, how to Name a Workbook with the Text in a Cell
Step1: Right click on sheet1 tab and select the view code option or else press Alt+F11 as a shortcut to go to VBA window.
Step2: Insert module and copy this code
Sub SaveAsCell( ) Dim strName As String On Error GoTo InvalidName strName = Sheet1.Range("B2") ActiveWorkbook.SaveAs strName Exit Sub InvalidName: MsgBox "The text: " & strName & _ " is not a valid file name.", vbCritical, "dptutorials.com" End Sub
Step3: And paste it here in the VBA window
Step4: Close this VBA window and go back to the Excel sheet.
Step5: From the menu bar, go to view tab and under macros, click on view macros
Step6: Select the SaveAsCell macro and click on Run and your workbook will automatically be saved as cell B2 of Sheet1.
Try to change the name in the cell B2 and save it, you can see the name of the file keeps changing and saving as a separate workbook in the same folder.
I hope this trick is very useful.
For further more interesting videos, please do subscribe dptutorials. Thanks for watching.
For Personalized detail learning, write to dptutorials15@gmail.com If you found this video valuable, give it a like. If you know someone who needs to see it, share it. Leave a comment below with your thoughts. Add it to a playlist if you want to watch it later.
***************************************************************
Read my full article on this: http://ift.tt/2kB14dh
***************************************************************
Subscribe for more Awesome Tutorials: goo.gl/4T8ePc
***************************************************************
Support The Channel via shopping: http://ift.tt/2jH38PR
**************************************************************
You Can Connect With Me at
G+ : http://ift.tt/2kAOpa6
Twitter : https://twitter.com/dptutorials15
Facebook : http://ift.tt/2kfRnDi
Blogspot : http://ift.tt/2kB14dh
If you want to save your excel workbook using the text in a specific cell as a filename, you need to watch this tutorial.
Click on the cell B2, enter some text and save it, you can see the file name as same as cell B2.
Let us learn this trick now, how to Name a Workbook with the Text in a Cell
Step1: Right click on sheet1 tab and select the view code option or else press Alt+F11 as a shortcut to go to VBA window.
Step2: Insert module and copy this code
Sub SaveAsCell( ) Dim strName As String On Error GoTo InvalidName strName = Sheet1.Range("B2") ActiveWorkbook.SaveAs strName Exit Sub InvalidName: MsgBox "The text: " & strName & _ " is not a valid file name.", vbCritical, "dptutorials.com" End Sub
Step3: And paste it here in the VBA window
Step4: Close this VBA window and go back to the Excel sheet.
Step5: From the menu bar, go to view tab and under macros, click on view macros
Step6: Select the SaveAsCell macro and click on Run and your workbook will automatically be saved as cell B2 of Sheet1.
Try to change the name in the cell B2 and save it, you can see the name of the file keeps changing and saving as a separate workbook in the same folder.
I hope this trick is very useful.
For further more interesting videos, please do subscribe dptutorials. Thanks for watching.
For Personalized detail learning, write to dptutorials15@gmail.com If you found this video valuable, give it a like. If you know someone who needs to see it, share it. Leave a comment below with your thoughts. Add it to a playlist if you want to watch it later.
***************************************************************
Read my full article on this: http://ift.tt/2kB14dh
***************************************************************
Subscribe for more Awesome Tutorials: goo.gl/4T8ePc
***************************************************************
Support The Channel via shopping: http://ift.tt/2jH38PR
**************************************************************
You Can Connect With Me at
G+ : http://ift.tt/2kAOpa6
Twitter : https://twitter.com/dptutorials15
Facebook : http://ift.tt/2kfRnDi
Blogspot : http://ift.tt/2kB14dh
Those guidelines additionally worked to become a good way to recognize that other people online have the identical fervor like mine to grasp great deal more around this condition.
ReplyDeleteProject Management Apps