Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub Workbook_Open()
- Dim lastRow As Long 'last row with data
- Dim thisDate As Double 'start timestamp
- thisDate = Now()
- With Sheets("Pressure Log")
- lastRow = .Range("B" & .Rows.Count).End(xlUp).Row 'populate next row with date/time
- .Range("B" & lastRow + 1 & ":G" & lastRow + 1).Borders.LineStyle = xlContinuous
- .Range("B" & lastRow).Offset(1) = Format(thisDate, "dddd")
- .Range("B" & lastRow).Offset(1, 1) = Format(thisDate, "mm/dd/yyyy")
- .Range("B" & lastRow).Offset(1, 2) = Format(thisDate, "hh:mm AM/PM")
- .Range("B" & lastRow).Offset(1, 3).Select 'position for data
- End With
- End Sub
Add Comment
Please, Sign In to add comment