Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unloading data from Userform to Sheet

Status
Not open for further replies.

daseffects

Technical User
Aug 21, 2003
38
GB
I've set up a combobox on a form using properties that set the Controlsource = Sheet1!A1 and the rowsource = Sheet1!B1:B10.

How do I get the Userform to update A1 on each change of the combobox and not just when the form closes as its currently doing?

Thanks

D
 
This should do the trick:

Code:
Private Sub ComboBox1_Change()
Sheet1.Range("A1").Text = ComboBox1.Value
End Sub

I hope this helps!



Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Tried it but I get run time error'424' object required error. Do I need to define an object before the code?

D

 
Got it to work w/ this slight tweek

Sheet1.Range("A1") = UserForm1.ComboBox1.Value


Thanks
 
Oooops, [blush]

Sorry about the ".Text" part, I must not have been thinking straight.



Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top