C
CMcK
Hi,
I'm working on a a usrFrm which appends cboBox values into cells when the
'Submit' button is clicked.
I want to be able to change the project name (cboBox value) and append fresh
data (values of txtBox & cboBox) in the next row down when the 'Submit'
button is pressed again, and so on (upto 50 times).
Any help would be very much appreciated.
I have written the below code to append the first line of data:
Private Sub cmdSubmit_Click()
Dim wb As Workbook
Dim ws As Worksheet
Set wb = ThisWorkbook
Set ws = wb.Sheets("Timesheet")
ws.Activate
ws.Cells(9, 2).Value = Me.cboProjectName.Text
ws.Cells(9, 3).Value = Me.txtProjectNumber.Text
ws.Cells(9, 4).Value = Me.cboProjectPhase.Text
ws.Cells(9, 7).Value = Me.cboMon.Text
ws.Cells(9, 8).Value = Me.cboTues.Text
ws.Cells(9, 9).Value = Me.cboWed.Text
ws.Cells(9, 10).Value = Me.cboThurs.Text
ws.Cells(9, 11).Value = Me.cboFri.Text
ws.Cells(9, 5).Value = Me.cboSat.Text
ws.Cells(9, 6).Value = Me.cboSun.Text
End Sub
I'm working on a a usrFrm which appends cboBox values into cells when the
'Submit' button is clicked.
I want to be able to change the project name (cboBox value) and append fresh
data (values of txtBox & cboBox) in the next row down when the 'Submit'
button is pressed again, and so on (upto 50 times).
Any help would be very much appreciated.
I have written the below code to append the first line of data:
Private Sub cmdSubmit_Click()
Dim wb As Workbook
Dim ws As Worksheet
Set wb = ThisWorkbook
Set ws = wb.Sheets("Timesheet")
ws.Activate
ws.Cells(9, 2).Value = Me.cboProjectName.Text
ws.Cells(9, 3).Value = Me.txtProjectNumber.Text
ws.Cells(9, 4).Value = Me.cboProjectPhase.Text
ws.Cells(9, 7).Value = Me.cboMon.Text
ws.Cells(9, 8).Value = Me.cboTues.Text
ws.Cells(9, 9).Value = Me.cboWed.Text
ws.Cells(9, 10).Value = Me.cboThurs.Text
ws.Cells(9, 11).Value = Me.cboFri.Text
ws.Cells(9, 5).Value = Me.cboSat.Text
ws.Cells(9, 6).Value = Me.cboSun.Text
End Sub