![]() |
Custom toolbars in templates
I have created a custom toolbar in and Excel 2003 template. The toolbar has
buttons that execute VBA subroutines. The Toolbar seems to function properly in the template, but when a new file is created from the template, the buttons for the subroutines produce errors. It appears that the toolbar in the new file is trying to execute the sub in the template. How do you make sure custom toolbar buttons execute the VBA sub in the workbook created from a template? |
Custom toolbars in templates
It's best to add the Toolbar using code. This example creates a Floating Toolbar +-------------------------------------------------------------------+ |Filename: ToolBarExample.xls | |Download: http://www.thecodecage.com/forumz/attachment.php?attachmentid=38| +-------------------------------------------------------------------+ -- royUK Hope that helps, RoyUK For tips & examples visit my 'web site' (http://www.excel-it.com/) ------------------------------------------------------------------------ royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=38055 |
Custom toolbars in templates
Well;
You must be sure to refer to right workbook. The worbook that you want to have the code executed on, must be the active workbook. So, set good reference to your workbooks, or work with statements like Workbooks(XYZ).Activate -- Best regards; Mark Rosenkrantz -- Spreadsheet Solutions Uithoorn Netherlands (the country were they live some 18 feet beyond sea level) -- E: W: www.spreadsheetsolutions.nl -- "D Riggins" wrote in message ... I have created a custom toolbar in and Excel 2003 template. The toolbar has buttons that execute VBA subroutines. The Toolbar seems to function properly in the template, but when a new file is created from the template, the buttons for the subroutines produce errors. It appears that the toolbar in the new file is trying to execute the sub in the template. How do you make sure custom toolbar buttons execute the VBA sub in the workbook created from a template? |
Custom toolbars in templates
Check your other post, too.
D Riggins wrote: I have created a custom toolbar in and Excel 2003 template. The toolbar has buttons that execute VBA subroutines. The Toolbar seems to function properly in the template, but when a new file is created from the template, the buttons for the subroutines produce errors. It appears that the toolbar in the new file is trying to execute the sub in the template. How do you make sure custom toolbar buttons execute the VBA sub in the workbook created from a template? -- Dave Peterson |
All times are GMT +1. The time now is 01:47 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com