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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combobox values to a work sheet crashing Excel

Status
Not open for further replies.

daseffects

Technical User
Aug 21, 2003
38
GB
I've been using the code below w/ some success to write the values of comboboxes to worksheets on change. However, my userform just started crashing Excel everytime I combobox was selected. Removing the code stopped the problem.

Is there a more efficient method of replicating the below?

Private Sub ComboBox5_Change()
Range("sheet1!a1") = Userform.combobox5.value
End Sub

I've also tried the below w/ no success

Private Sub ComboBox5_Change()
Range("sheet1!a1").value = Userform.combobox5.value
End Sub

David
 
Hi David,

Try this one:
Private Sub ComboBox5_Change()
Worksheets("Sheet1").Range("A1").Value = ComboBox5.Value
End Sub

Good luck.

Regards,
Unica
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top