ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Storing date and time (https://www.excelbanter.com/excel-programming/423846-storing-date-time.html)

Noepie

Storing date and time
 
Hello,

I have several macro's which are run periodically. I'd like to store the
date and time in the cells next to each of the macro buttons after the macro
was executed. Does anyone know how to do this with VBA-code?

Thanx.

Noepie

Paul

Storing date and time
 
If the button is in E4
Range("F4").value= Now

Paul

"Noepie" wrote in message
...
Hello,

I have several macro's which are run periodically. I'd like to store the
date and time in the cells next to each of the macro buttons after the
macro
was executed. Does anyone know how to do this with VBA-code?

Thanx.

Noepie




Mike H

Storing date and time
 
Maybe this

Sub Button2_Click()
Range(ActiveSheet.Buttons(Application.Caller).Bott omRightCell.Offset(-2,
1).Address).Value = Now
End Sub

Mike

"Noepie" wrote:

Hello,

I have several macro's which are run periodically. I'd like to store the
date and time in the cells next to each of the macro buttons after the macro
was executed. Does anyone know how to do this with VBA-code?

Thanx.

Noepie



All times are GMT +1. The time now is 10:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com