+ Reply to Thread
Results 1 to 5 of 5

Menu Item Deleted

  1. #1
    Caddy Shack
    Guest

    Menu Item Deleted

    In one excel file, in the ThisWorkbook object, in the Private Sub
    Workbook_Open() event, I entered the this line of code:
    Application.CommandBars(1).Name("Format").Delete
    The intent was to disable Format>Sheets>unhide to the users in this
    particular file.
    Format has gone away in all instances of Excel and reinstalls do not cure
    the problem. I am at a loss. Can anyone help?


  2. #2
    Ron de Bruin
    Guest

    Re: Menu Item Deleted

    Hi Caddy

    I think you used
    Application.CommandBars(1).Controls("Format").Delete

    You can reset it like this
    Application.CommandBars(1).Reset

    For more information see
    http://www.rondebruin.com/menuid.htm


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl



    "Caddy Shack" <[email protected]> wrote in message news:[email protected]...
    > In one excel file, in the ThisWorkbook object, in the Private Sub
    > Workbook_Open() event, I entered the this line of code:
    > Application.CommandBars(1).Name("Format").Delete
    > The intent was to disable Format>Sheets>unhide to the users in this
    > particular file.
    > Format has gone away in all instances of Excel and reinstalls do not cure
    > the problem. I am at a loss. Can anyone help?
    >




  3. #3
    Bob Phillips
    Guest

    Re: Menu Item Deleted

    BTW, the code you want is

    Application.CommandBars(1).Controls("Format").controls("Sheet").controls("Un
    hide...").enabled=false


    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Ron de Bruin" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Caddy
    >
    > I think you used
    > Application.CommandBars(1).Controls("Format").Delete
    >
    > You can reset it like this
    > Application.CommandBars(1).Reset
    >
    > For more information see
    > http://www.rondebruin.com/menuid.htm
    >
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    >
    > "Caddy Shack" <[email protected]> wrote in message

    news:[email protected]...
    > > In one excel file, in the ThisWorkbook object, in the Private Sub
    > > Workbook_Open() event, I entered the this line of code:
    > > Application.CommandBars(1).Name("Format").Delete
    > > The intent was to disable Format>Sheets>unhide to the users in this
    > > particular file.
    > > Format has gone away in all instances of Excel and reinstalls do not

    cure
    > > the problem. I am at a loss. Can anyone help?
    > >

    >
    >




  4. #4
    Ron de Bruin
    Guest

    Re: Menu Item Deleted

    Hi Caddy

    If your workbook will also be used in non US Excel versions use the ID numbers
    of the control(see my site).
    If not use Bob's example

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl



    "Bob Phillips" <[email protected]> wrote in message news:[email protected]...
    > BTW, the code you want is
    >
    > Application.CommandBars(1).Controls("Format").controls("Sheet").controls("Un
    > hide...").enabled=false
    >
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "Ron de Bruin" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hi Caddy
    >>
    >> I think you used
    >> Application.CommandBars(1).Controls("Format").Delete
    >>
    >> You can reset it like this
    >> Application.CommandBars(1).Reset
    >>
    >> For more information see
    >> http://www.rondebruin.com/menuid.htm
    >>
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >>
    >> "Caddy Shack" <[email protected]> wrote in message

    > news:[email protected]...
    >> > In one excel file, in the ThisWorkbook object, in the Private Sub
    >> > Workbook_Open() event, I entered the this line of code:
    >> > Application.CommandBars(1).Name("Format").Delete
    >> > The intent was to disable Format>Sheets>unhide to the users in this
    >> > particular file.
    >> > Format has gone away in all instances of Excel and reinstalls do not

    > cure
    >> > the problem. I am at a loss. Can anyone help?
    >> >

    >>
    >>

    >
    >




  5. #5
    Bob Phillips
    Guest

    Re: Menu Item Deleted

    Ron,

    I keep forgetting that. Thanks

    Bob


    "Ron de Bruin" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Caddy
    >
    > If your workbook will also be used in non US Excel versions use the ID

    numbers
    > of the control(see my site).
    > If not use Bob's example
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    >
    > "Bob Phillips" <[email protected]> wrote in message

    news:[email protected]...
    > > BTW, the code you want is
    > >
    > >

    Application.CommandBars(1).Controls("Format").controls("Sheet").controls("Un
    > > hide...").enabled=false
    > >
    > >
    > > --
    > >
    > > HTH
    > >
    > > RP
    > > (remove nothere from the email address if mailing direct)
    > >
    > >
    > > "Ron de Bruin" <[email protected]> wrote in message
    > > news:[email protected]...
    > >> Hi Caddy
    > >>
    > >> I think you used
    > >> Application.CommandBars(1).Controls("Format").Delete
    > >>
    > >> You can reset it like this
    > >> Application.CommandBars(1).Reset
    > >>
    > >> For more information see
    > >> http://www.rondebruin.com/menuid.htm
    > >>
    > >>
    > >> --
    > >> Regards Ron de Bruin
    > >> http://www.rondebruin.nl
    > >>
    > >>
    > >>
    > >> "Caddy Shack" <[email protected]> wrote in message

    > > news:[email protected]...
    > >> > In one excel file, in the ThisWorkbook object, in the Private Sub
    > >> > Workbook_Open() event, I entered the this line of code:
    > >> > Application.CommandBars(1).Name("Format").Delete
    > >> > The intent was to disable Format>Sheets>unhide to the users in this
    > >> > particular file.
    > >> > Format has gone away in all instances of Excel and reinstalls do not

    > > cure
    > >> > the problem. I am at a loss. Can anyone help?
    > >> >
    > >>
    > >>

    > >
    > >

    >
    >




+ 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