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

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -