|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Help with a combo box trick please!
I am using a UserForm in Excel to get user input that is sent to a spreadsheet.
What I am having trouble with is this: I want the form to be able to change an existing entry. To do this, I have it set up so that when you make a selection in the first combo box, the existing values pop up in the other combo boxes. The problem is that it won't change the fields on the sheet even when i change the entries in the combo boxes. Please let me know if i am not explaining myself well. Appriciate any help!! Sub filldata() therow = 1 tryagain: If Cells(therow, 1) = "" Then GoTo gotit End If If Cells(therow, 1) = namedata Then GoTo gotit End If therow = therow + 1 GoTo tryagain gotit: companydata.Value = Cells(therow, 2) End Sub Private Sub namedata_Change() filldata End Sub Private Sub OK_Click() writer End Sub Sub writer() therow = 1 tryagain: If Cells(therow, 1) = "" Then GoTo gotit End If If Cells(therow, 1) = namedata Then GoTo gotit End If therow = therow + 1 GoTo tryagain gotit: With Worksheets("sheet1") .Cells(therow, 1) = namedata .Cells(therow, 2) = companydata End With UserForm1.Hide End Sub |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Help with a combo box trick please! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|