+ Reply to Thread
Results 1 to 4 of 4

Menu customizations affect all workbooks?

  1. #1

    Menu customizations affect all workbooks?

    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. #2
    STEVE BELL
    Guest

    Re: Menu customizations affect all workbooks?

    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
    <[email protected]> wrote in message
    news:[email protected]...
    > 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. #3
    Andy Wiggins
    Guest

    Re: Menu customizations affect all workbooks?

    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
    -

    <[email protected]> wrote in message
    news:[email protected]...
    > 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. #4

    Re: Menu customizations affect all workbooks?

    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
    > -
    >
    > <[email protected]> wrote in message
    > news:[email protected]...
    > > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1