Hej
Jag behöver ha lite hjälp med att få timestamp sparat direkt efter att Excelboken har öppnats. Jag fick följande kod tidigare,
går det att lägga till min önskade funktion?
Tack på förhand
//Thomas
Option Explicit
Sub workbook_open()
Dim userSh As Worksheet: Set userSh = ThisWorkbook.Sheets("Logg")
Dim Lastrow As Long: Lastrow = userSh.Cells(userSh.Cells.Rows.Count, "A").End(xlUp).Row + 1
userSh.Range("A" & Lastrow) = Application.UserName
userSh.Range("B" & Lastrow) = Date
userSh.Range("C" & Lastrow) = Time
End Sub
Har löst problemet själv med följande lilla kod:
ActiveWorkbook.Save
//Thomas