We help IT Professionals succeed at work.
Get Started

Adding Timestamp When a Macro Runs on Excel 2010

Ray Erden
Ray Erden asked
Last Modified: 2016-02-11
Background: The attached two files are Excel 2010 (Loader.xlms) that needs to be updated and the other one is a text file (SampleData) storing the data set.  Sheet1 and Sheet2 work together on this file.  User clicks on the button (Refresh Data) on Sheet2 which runs the ImportProcess macro to update the data residing on Sheet1 by opening the text file and pulling the data into Sheet1. This macro makes two macro calls one is to delete the range before the update and the other to open the text file and pull data in. DataImport macro uses external data connection and import feature.  Data set on Sheet1 needs to be updated twice a day everyday.  

Question1:   I need to add a timestamp on Sheet2 under the header TIME STAMP in column A.  Each time the user runs the macro by clicking on the "refresh data" button on Sheet2 to update the data set on Sheet1 of the Loader.xlsm file time should be captured, Excel needs to create a timestamp for this action and also needs to keep a history for each update by displaying the timestamp.  The format of the timestamp should be displaying date, hour, min, second.

Question2:  Upon resolving the first question I will also need to create an auto update process so the user does not have to manually click on the button twice a day but rather macro should run on predetermined times by itself.

Thanks in advance for help
Watch Question
Top Expert 2010
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE