Hi
I have many codes in standard modules , commandbutton1 on userform . the modules names ("save_data", "search_data" , "copy data", "close_form")
the command button1 contains
call search_data
call copy data
call close_form
so what I want if the combobox1 contains item , then should change name of commandbutton1 into search based on module search_data and run the macro by call it
and if the textbox1 contains item ,then should change name of commandbutton1 into copy based on module copy_data and run the macro by call it
and if all of the the tools (textboxes & comboboxes ) are empty ,then should change name of commandbutton1 into close based on module close _data and run the macro by call it .
so I depends on one commandbutton , but should change its name into specific commandbutton.caption based on standard module name and run it based on specific filled tool
thanks
I have many codes in standard modules , commandbutton1 on userform . the modules names ("save_data", "search_data" , "copy data", "close_form")
the command button1 contains
call search_data
call copy data
call close_form
so what I want if the combobox1 contains item , then should change name of commandbutton1 into search based on module search_data and run the macro by call it
and if the textbox1 contains item ,then should change name of commandbutton1 into copy based on module copy_data and run the macro by call it
and if all of the the tools (textboxes & comboboxes ) are empty ,then should change name of commandbutton1 into close based on module close _data and run the macro by call it .
so I depends on one commandbutton , but should change its name into specific commandbutton.caption based on standard module name and run it based on specific filled tool
thanks