Verelst_Jan
New Member
- Joined
- Aug 17, 2024
- Messages
- 3
- Office Version
- 365
- Platform
- Windows
Hello,
I like to create a vba code that will fill in the date and time when you press it into another sheet. I wanne create one dashboard with buttons that will fill in the date in different sheets.
This i what i already found but this will fill it in the same sheet and cannot find how to change it. These is my first time with VBA
Private Sub Airlock_1()
Sheet1.Range("A9").Select
ActiveCell.EntireRow.Insert shift:=xlDown
Sheet1.Range("A10").Select
ActiveCell.Formula = Date
Sheet1.Range("B10").Select
ActiveCell.Formula = Time
End Sub
Regards,
Jan
I like to create a vba code that will fill in the date and time when you press it into another sheet. I wanne create one dashboard with buttons that will fill in the date in different sheets.
This i what i already found but this will fill it in the same sheet and cannot find how to change it. These is my first time with VBA

Private Sub Airlock_1()
Sheet1.Range("A9").Select
ActiveCell.EntireRow.Insert shift:=xlDown
Sheet1.Range("A10").Select
ActiveCell.Formula = Date
Sheet1.Range("B10").Select
ActiveCell.Formula = Time
End Sub
Regards,
Jan