Copy Excel File and add username and date

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

Sub nameit()
Dim UserName As String
Dim path As String
Dim filename As String


UserName = Environ$(“UserName”)
‘MsgBox UserName
NewFile = UserName & ” ” & Format(Date, “ddmmmyyyy”)
path = “C:UsersscreaOneDriveDesktopinvoices”
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

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


Follow me on twitter

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

5/5 - (1 bình chọn)

Bài viết liên quan

Theo dõi
Thông báo của
Cũ nhất
Mới nhất Được bỏ phiếu nhiều nhất
Phản hồi nội tuyến
Xem tất cả bình luận
Aravind D

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

Barb Henderson

Thank you so much for watching my video. If you have any suggestions for future topics please leave them in the comments.