vba - Excel quick access toolbar - run macro from active instead of previous workbook -
i have custom button (not add-in, "shortcut" button) in excel's quick access toolbar run macro in active workbook. workbook modified , saved daily new filename. when link first created in active workbook (call version 1) macro runs fine. following day (filename version 2) clicking on macro button opens workbook version 1 , runs macro saved in version 1.
is there simple way break link , run macro in recent active workbook?
the code basic - opens userform , saved in "thisworkbook"
sub open_data_userform() ufdata.show end sub
i try guide through this, hope helps.
what need need call open_data_userform() our "personal.xlsb" file. in vb editor screen, in project explorer find file called "personal.xlsb", need add "module" , add following code:
sub kickoff() call application.run(excel.activeworkbook.name & "!open_data_userform") end sub by able call userform.show function our personal.xlsb running in background when open excel.
ps: assuming open_data_userform() coded in daily workbook.
update: personal.xlsb file should visible in project explorer below:

if not there record dummy macro , select personal file below should appear in project explorer in vba screen:

Comments
Post a Comment