ellyna
Banned - Rules violations
- Joined
- Nov 29, 2020
- Messages
- 89
- Office Version
- 2013
- Platform
- Windows
hi there may i ask regarding my number sequence ?
How do i change my script as i want it start from number 1 in excel database ?
Thank you
How do i change my script as i want it start from number 1 in excel database ?
Thank you
VBA Code:
Sub Submit()
Dim sh As Worksheet
Dim iRow As Long
Set sh = ThisWorkbook.Sheets("Database")
iRow = [Counta(Database!A:A)] + 3
With sh
.Cells(iRow, 1) = iRow - 1
.Cells(iRow, 2) = frmForm.txtDate.Value
.Cells(iRow, 3) = Now()
.Cells(iRow, 3).NumberFormat = "dd-mm-yyyy | HH:mm:ss"
.Cells(iRow, 4) = frmForm.cmbShift.Value
.Cells(iRow, 5) = frmForm.cmbDepartment.Value
.Cells(iRow, 6) = frmForm.txtLeader.Value
.Cells(iRow, 7) = frmForm.txtAssistance.Value