filmov
tv
Excel VBA: To record How many time the workbook is opened and Saved
![preview_player](https://i.ytimg.com/vi/A7mv0Vktu2Y/maxresdefault.jpg)
Показать описание
Excel VBA: To record How many time the workbook is opened and Saved
This is an continuation Part to my previous Video : Count How many times the workbook gets Open.
Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim emptyrow As Long
emptyrow = WorksheetFunction.CountA(Range("B:B")) + 1
Cells(emptyrow, 2).Value = Date & " " & Time
End Sub
Private Sub Workbook_Open()
Dim emptyrow As Long
emptyrow = WorksheetFunction.CountA(Range("A:A")) + 1
Cells(emptyrow, 1).Value = Date & " " & Time
End Sub
Thanks for Watching
Feel Free to subscribe
Watch More Videos
This is an continuation Part to my previous Video : Count How many times the workbook gets Open.
Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim emptyrow As Long
emptyrow = WorksheetFunction.CountA(Range("B:B")) + 1
Cells(emptyrow, 2).Value = Date & " " & Time
End Sub
Private Sub Workbook_Open()
Dim emptyrow As Long
emptyrow = WorksheetFunction.CountA(Range("A:A")) + 1
Cells(emptyrow, 1).Value = Date & " " & Time
End Sub
Thanks for Watching
Feel Free to subscribe
Watch More Videos