Mar 2, 2008 #1 2ks Technical User Joined Jan 13, 2007 Messages 54 Location GB Can anyone tell me how I can get VBA to automatically return a value in a textbox depending on 5 choices in a combo box. Thanks
Can anyone tell me how I can get VBA to automatically return a value in a textbox depending on 5 choices in a combo box. Thanks
Mar 2, 2008 1 #2 ClulessChris IS-IT--Management Joined Jan 27, 2003 Messages 890 Location GB Select case on the combobox using the change event. Never knock on Death's door: ring the bell and run away! Death really hates that! Upvote 0 Downvote
Select case on the combobox using the change event. Never knock on Death's door: ring the bell and run away! Death really hates that!
Mar 2, 2008 Thread starter #3 2ks Technical User Joined Jan 13, 2007 Messages 54 Location GB So I guess this starts Sub Combox1_Change() But how do I get it to change the textbox depending on value selected. Cheers Upvote 0 Downvote
So I guess this starts Sub Combox1_Change() But how do I get it to change the textbox depending on value selected. Cheers
Mar 2, 2008 #4 ClulessChris IS-IT--Management Joined Jan 27, 2003 Messages 890 Location GB Something like: Code: Private Sub ComboBox1_Change() Select Case ComboBox.Value Case value1 TextBox.Value = value1 Case Value2 TextBox.Value = Value2 End Select End Sub Never knock on Death's door: ring the bell and run away! Death really hates that! Upvote 0 Downvote
Something like: Code: Private Sub ComboBox1_Change() Select Case ComboBox.Value Case value1 TextBox.Value = value1 Case Value2 TextBox.Value = Value2 End Select End Sub Never knock on Death's door: ring the bell and run away! Death really hates that!
Mar 3, 2008 Thread starter #5 2ks Technical User Joined Jan 13, 2007 Messages 54 Location GB Excellent and tweaked to suit with perfect results. Simple I guess when you know how. daft thing is done far more complicated things before Upvote 0 Downvote
Excellent and tweaked to suit with perfect results. Simple I guess when you know how. daft thing is done far more complicated things before