Re: A Macro To Open A Specific Workbook Based On The Cell Value In My Current Workboo
The way that macro is set up, is when a value is typed into cell B2, and the 'enter' key is pushed, the cell accepts the value, and then the worksheet_change event (the worksheet_change macro i posted) get automatically triggered. It will be triggered every single time the value in cell B2 changes.
If you want to change it so that no workbooks are opened until a user clicks a button, just change the macro to
and then cut and paste the whole thing into a new module (in the VBE, go to insert, then new module). You now should not have anything in the worksheet modules, and the macro should be in the module that got named 'module1' when you inserted it.
Then, you can use the drawing toolbar to create a shape (rectangle, circle, etc). Right click on the shape, and go to assign macro, then choose your macro from the list (there should only be one macro listed).
You can also use the control toolbox bar to add a commandbutton and then assign a macro to it.