Add Current date and time when pressing a command button

C

CAM

Hello,

I would like to get the current date and time when pressing a comman button
in cell A5 what would the vba code be? Any help will be appreicated.
Thank you in advance.

Regards,
 
S

Spreadsheet Solutions

Hello;

Cells(5, 1) = Format(Now, "DD/MM/YYYY : HH/MM/SS")

The format can be adjusted according to your regional settings.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top