text & combobox info into worksheet

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top