Copy Excel File and add username and date. When a file is copied, automatically add the username and date to the new file name. How to get the user name from the current user.
Allow me teach you the skills in Excel that you need for business
Let me teach you the VBA that I have learn in my five years of consulting
Learn more about user forms
Code
Sub nameit()
Dim UserName As String
Dim path As String
Dim filename As String
Worksheets(“Invoice”).Select
UserName = Environ$(“UserName”)
‘MsgBox UserName
NewFile = UserName & ” ” & Format(Date, “ddmmmyyyy”)
path = “C:UsersscreaOneDriveDesktopinvoices”
Worksheets(“Invoice”).Copy
Application.DisplayAlerts = False
With ActiveWorkbook
.SaveAs filename:=path & NewFile, FileFormat:=xlOpenXMLWorkbook
.Close savechanges:=False
End With
Application.DisplayAlerts = True
End Sub
For more help visit my website or email me at easyexcelanswers@gmail.com.
Contact me regarding customizing this template for your needs.
Click for online Excel Consulting
I am able to provide online help on your computer at a reasonable rate.
Check out my next one-hour Excel Webinar
I use a Blue condensor Microphone to record my videos, here is the link
Check out Crowdcast for creating your webinars
If you need to buy Office 2019 follow
I use Tube Buddy to help promote my videos
Check them out
Follow me on Facebook
TWEET THIS VIDEO
Follow me on twitter
easyexcelanswers
IG @barbhendersonconsulting
You can help and generate a translation to you own language
*this description may contain affiliate links. When you click them, I may receive a small commission at no extra cost to you. I only recommend products and services that I’ve used or have experience with.
Watch more new videos about Excel Office | Synthesized by Mindovermetal English
Can you do macro to remove invisible special characters ..using excel macro becouse sometimes when copy data from pdf file to excel some invisible special characters also pasted in excel….do macro to solve this scenario
Thank you so much for watching my video. If you have any suggestions for future topics please leave them in the comments.