excel vba - When I write in a TextBox with Calcul behind then comes directly the Result in another TextBox -
i have 1 userform 1 textbox , 1 combobox.
i firstly write in combobox (per exemple sarah)
private sub combobox1_change() thisworkbook.sheets("calculsheet").range("a2").value = combobox1.text end sub then makes calcul in a3 (if d2=sarah d3=1)
private sub userform_active() application.screenupdating = false thisworkbook.worksheets("calculsheet").activate textbox1 = range("a3").value end sub and want result comes directly in textbox1. means write sarah in combobox1 , directly comes 1 in textbox1.
delete private sub userform_active() code. don't need that. replace combobox1_change() this.
is trying? (untested)
private sub combobox1_change() thisworkbook.sheets("calculsheet") .range("a2").value = combobox1.text doevents textbox1.text = .range("a3").value end end sub
Comments
Post a Comment