VBA userform 2 commandbuttons + attribute value to variable -
i have basic vba knowledge. trying find way make user choice between 2 value "internal" or "external" depending on results run 1 part of code or part.
what best way achieve this?
i have started create user form, how can value type_trade sub , use if statement?
private sub external_click() dim type_trade string type_trade = "external" end sub private sub internal_b2b_click() dim type_trade string type_trade = "internal_b2b" end sub private sub userform_click() end sub
one way achieve follows:
private type_trade string private sub external_click() type_trade = "external" end sub private sub internal_b2b_click() type_trade = "internal_b2b" end sub private sub someotherpoint() if type_trade = "internal_b2b" 'do end if end sub
Comments
Post a Comment