How to trigger a macro on cell *selection*
I am slowly learning VBA.
I have an Excel spreadsheet and between 25 and 100 MS Word documents in the same hard drive folder. The spreadsheet uses 4 sheets. The first sheet, “Available Documents,” has a table with 2 columns:
Document number (for example, “Gardening-0017” – The associated Word document uses the “document number” as the file name.)
Document title (for example, “pruning roses”)
All of the sheet’s cells are protected from edits, and selections are limited to the cells in the document number column. When the user selects a cell in that column, I want to open the associated Word file and then return when the user finishes reviewing that file. I have created a Word template with a command button that minimizes and then closes the Word file, so that should return control to the Excel table. But how to call the document? I could create a command button for each cell in the column, but that seems heavy.
What commands or functions could I use to trigger a macro based on selecting a cell from the document number column (the cells are protected against changes) and call an external document?
And how do I prevent calls based on a multi-cell selection?
I would sincerely appreciate any suggestions that you can offer.
Very respectfully,
Larry
|