Results 1 to 2 of 2
2005-11-03, 18:13 #1
- Join Date
- Jul 2005
- Thanked 0 Times in 0 Posts
selecting specific worksheets (Excel 2000)
I am creating a macro in personal.xls creates a new toolbar. In that toolbar it creates a menu called "Workbooks" and sub menus from there of each workbooks name and for a given workbook the sheets associated with it. (i.e.
I have gotten that part to work just fine. I link all of the toolbar items associated, by name, with specific worksheets to the same macro and was hoping to find a simple way of determining which 'click' called the macro and select that workbook, worksheet combination. To my knowledge there is no property or method that relates to the calling object for the macro so right now my code recursivly calls itself by, within the macro, selecting each object and through error handling activating that worksheet. The problem that I am running into now is when i skip placing Personal.xls within the toolbar the counters i have for selecting the workbook and worksheets are messed up somehow. I am pretty sure there is a way to determine what, within the toolbar, has been selected because if you are debugging the code it places a check-mark beside the one that I selected.
2005-11-03, 19:53 #2
- Join Date
- Mar 2002
- Thanked 29 Times in 29 Posts
Re: selecting specific worksheets (Excel 2000)
Application.CommandBars.ActionControl is the commandbarbutton that was clicked. Type ActionControl and press F1 to get online help about it.