PDA

View Full Version : Unlimited Sub ()



kamalmalek
09-27-2018, 01:12 AM
Dear Supporters,
good day!
:hi:
i have 13 sub ()
Sub M301M() till M314() " and all same commands just change numbers from sub to sub"

SUB M301M() run when input 301 in text box

i need to run macro MxxxM() ONCE input xxx in text box,
Example, if i input 990 in text box i need to create new sub M990M() and run this macro , and SUB M990M() is same as Sub M301M() ,just replace 301 in old sub with 990 in new sub

Thanks

Aflatoon
09-27-2018, 02:25 AM
It sounds like you should rewrite your routine either to take the number as an argument and then just callit passing that number, or have the routine prompt for the number and then run accordingly. Impossible to be more specific without any code.