Time Stamp with Screen Updating

sturnusek

Board Regular
Joined
Sep 20, 2018
Messages
51
Hi there,

I'm wondering if there is someone nice to type up a macro for me. So, generally I need a macro that once a button is clicked, it will create a Time Stamp in the 'U26' cell automatically. Once a button is clicked again, it will then place a Time Stamp in 'U27' and so on...

Any ideas?

Thanks
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Code:
Sub CommandButton1_Click()

LRow = Cells(Rows.Count, "U").End(xlUp).Row

If LRow < 26 Then LRow = 26

Cells(LRow, "U").Value = format(now(), "hh:mm:ss")

End Sub
 
Last edited:
Upvote 0
Hi,

Thank you for this. I just used the code and it does place a Timestamp in U26, but once clicked again it doesn't 'move on' to U27, but refreshes itself.

Thanks
 
Upvote 0
My bad


Code:
[COLOR=#333333]Sub CommandButton1_Click()[/COLOR]
LRow = Cells(Rows.Count, "U").End(xlUp).Row +1

If LRow < 26 Then LRow = 26

Cells(LRow, "U").Value = format(now(), "hh:mm:ss")
 [COLOR=#333333]End Sub[/COLOR]
 
Upvote 0

Forum statistics

Threads
1,223,703
Messages
6,173,980
Members
452,540
Latest member
haasro02

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top