C
Chong Moua
Hi David,
Try the code below for some ideas.
---------------------------------------
Private Sub cmdOK_click()
Dim i As Integer
For i = 5 To 25
If Cells(i, "A") = "" Then
Sheets("MySheet").Cells(i, "A") = frmMyForm.cboBox1
Sheets("MySheet").Cells(i, "B") = frmMyForm.cboBox2
Sheets("MySheet").Cells(i, "C") = frmMyForm.txtBox1
Sheets("MySheet").Cells(i, "D") = frmMyForm.txtBox2
End If
Exit Sub
Next i
End Sub
Try the code below for some ideas.
---------------------------------------
Private Sub cmdOK_click()
Dim i As Integer
For i = 5 To 25
If Cells(i, "A") = "" Then
Sheets("MySheet").Cells(i, "A") = frmMyForm.cboBox1
Sheets("MySheet").Cells(i, "B") = frmMyForm.cboBox2
Sheets("MySheet").Cells(i, "C") = frmMyForm.txtBox1
Sheets("MySheet").Cells(i, "D") = frmMyForm.txtBox2
End If
Exit Sub
Next i
End Sub