PDA

View Full Version : Solved: Combobox Value in Userform to a textbox in an activeworksheet



jammer6_9
04-06-2007, 03:33 AM
Hello,

How can i save a combobox value from a user form to a textbox place in a worksheet.

Private Sub cmdSave_Click()
Sheets("training!txtTrainer1").Value = cmbTrainer2.Value

End Sub

Error message is;

Run Time error (9)
Subscript is out of range

Thank you in advance for any help out.

feathers212
04-06-2007, 05:37 AM
This worked for me:
Private Sub cmdSave_Click()
Sheets("training").txtTrainer1.Text = cmbTrainer2.Value
End Sub

jammer6_9
04-06-2007, 09:50 AM
huhhh it was an easy code but without the expert like you how will i know... A big dump of thankssss...:thumb

lucas
04-06-2007, 10:25 AM
Hi jammer,
If your thread is solved please mark it as solved using the thread tools at the top of the page....