Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am trying to customize a workbook, and will be adding several menu options that are specific to my user community. The menu additions are intended to be temporary, and should not affect the behavior of ANY other xls workbook. How do I ensure this happens? The menu options are added using VBA code during the workbook open sequence "auto_open()", and are removed during the "auto_close()" sequence. However, if someone is so foolish as to double click on an xls file while this special workbook is open they will have the added options available and I don't want them to even see the options, let alone click on them. In addition, I am disabling a few of the standard menu options ("Open...", and "New...") because they are meaningless in the context of my application. Am I looking for trouble by doing this? I don't think this will cause a problem, but who knows what MS has dreamed up for the unwary :) I would prefer that the double click action either does nothing, or launches a completely new instance of Excel with none of the menu modifications applied. Is this possible? If it is possible, how do I do this? I am not a VBA expert so a little patience is appreciated. Regards, Brad |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Check out the Activate and Deactivate options. I have found this useful for
just this purpose. Private Sub Workbook_Activate() [ build macro] End Sub Private Sub Workbook_Deactivate() [delete macro] End Sub -- steveB Remove "AYN" from email to respond wrote in message oups.com... Hi, I am trying to customize a workbook, and will be adding several menu options that are specific to my user community. The menu additions are intended to be temporary, and should not affect the behavior of ANY other xls workbook. How do I ensure this happens? The menu options are added using VBA code during the workbook open sequence "auto_open()", and are removed during the "auto_close()" sequence. However, if someone is so foolish as to double click on an xls file while this special workbook is open they will have the added options available and I don't want them to even see the options, let alone click on them. In addition, I am disabling a few of the standard menu options ("Open...", and "New...") because they are meaningless in the context of my application. Am I looking for trouble by doing this? I don't think this will cause a problem, but who knows what MS has dreamed up for the unwary :) I would prefer that the double click action either does nothing, or launches a completely new instance of Excel with none of the menu modifications applied. Is this possible? If it is possible, how do I do this? I am not a VBA expert so a little patience is appreciated. Regards, Brad |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This might be a help:
http://www.bygsoftware.com/Excel/VBA...tiveWbDemo.htm Or from the "Menu Routines" section on page: http://www.bygsoftware.com/examples/examples.htm It contains VBA code that will activate a menu only when the workbook it is in is active. The code is open and commented. -- Andy Wiggins FCCA www.BygSoftware.com Excel, Access and VBA Consultancy - wrote in message oups.com... Hi, I am trying to customize a workbook, and will be adding several menu options that are specific to my user community. The menu additions are intended to be temporary, and should not affect the behavior of ANY other xls workbook. How do I ensure this happens? The menu options are added using VBA code during the workbook open sequence "auto_open()", and are removed during the "auto_close()" sequence. However, if someone is so foolish as to double click on an xls file while this special workbook is open they will have the added options available and I don't want them to even see the options, let alone click on them. In addition, I am disabling a few of the standard menu options ("Open...", and "New...") because they are meaningless in the context of my application. Am I looking for trouble by doing this? I don't think this will cause a problem, but who knows what MS has dreamed up for the unwary :) I would prefer that the double click action either does nothing, or launches a completely new instance of Excel with none of the menu modifications applied. Is this possible? If it is possible, how do I do this? I am not a VBA expert so a little patience is appreciated. Regards, Brad |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you gentlemen, I appreciate the help!
Brad Andy Wiggins wrote: This might be a help: http://www.bygsoftware.com/Excel/VBA...tiveWbDemo.htm Or from the "Menu Routines" section on page: http://www.bygsoftware.com/examples/examples.htm It contains VBA code that will activate a menu only when the workbook it is in is active. The code is open and commented. -- Andy Wiggins FCCA www.BygSoftware.com Excel, Access and VBA Consultancy - wrote in message oups.com... Hi, I am trying to customize a workbook, and will be adding several menu options that are specific to my user community. The menu additions are intended to be temporary, and should not affect the behavior of ANY other xls workbook. How do I ensure this happens? The menu options are added using VBA code during the workbook open sequence "auto_open()", and are removed during the "auto_close()" sequence. However, if someone is so foolish as to double click on an xls file while this special workbook is open they will have the added options available and I don't want them to even see the options, let alone click on them. In addition, I am disabling a few of the standard menu options ("Open...", and "New...") because they are meaningless in the context of my application. Am I looking for trouble by doing this? I don't think this will cause a problem, but who knows what MS has dreamed up for the unwary :) I would prefer that the double click action either does nothing, or launches a completely new instance of Excel with none of the menu modifications applied. Is this possible? If it is possible, how do I do this? I am not a VBA expert so a little patience is appreciated. Regards, Brad |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Losing Customizations On Quick Access Toolbar When I Reopen File | Excel Discussion (Misc queries) | |||
Reset all toolbar customizations | Excel Discussion (Misc queries) | |||
How does 1 value affect the average? | Excel Worksheet Functions | |||
custom menu cross contamination between open workbooks. | Excel Programming | |||
User-preference Customizations in Personal.xls | Excel Programming |