ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   text & combobox info into worksheet (https://www.excelbanter.com/excel-programming/278107-text-combobox-info-into-worksheet.html)

Chong Moua

text & combobox info into worksheet
 
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
-------------------------------------
Hope this helps...

Chong Moua

-----Original Message-----
Hi,
I have a form that has two comboboxes and two text boxes
where the user inputs information. I was hoping that
someone could help me with the code that will allow me to
take the info off of the form and put it into a
spreadsheet. Data will be entered into this spreadsheet
daily off of this form, so I need it to go to the next
empty cell within a range of rows that are associated

with
a month. for example, rows 5 -25 are for January entries.
So if the date the entry takes place is in January, then
it will go to the first available row in the January
section.
Thanks for any help or direction that you can give me.
David
.



All times are GMT +1. The time now is 09:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com