• Why disable menu items and buttons? (Any)

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Why disable menu items and buttons? (Any)

    Author
    Topic
    #380974

    hello

    Lately I’ve seen a several posts asking how to disable menu items or buttons in the various Office apps. Why? You don’t want your users doing something, so you want to remove that option. If I was a user, it would annoy me to no end if various menu items or buttons vanished when I went to use a template or application. I’ve never removed menu items or buttons in the solutions that I’ve created. There are other ways to solve the problem. Many times it’s just locking down the document/template/workbook. I’m just not comfortable with the “I know better than you” philosophy. Make something idiot proof and they’ll build a better idiot. Your users will always find a way to mess up your perfectly created app no matter what you do.

    Agree? Disagree?

    cheers

    Viewing 2 reply threads
    Author
    Replies
    • #640090

      I needed to do this on one occassion because my Macros didn’t behave very well when the user had Word open with no document. So I disabled all the commands on my toolbars when there was no active document.

      Another time I have done this is when a Macro in a global template can only be used with documents attached to a particular document template.

      StuartR

    • #640111

      Agree, at least in principle.

      I work for a publisher, and send documents and templates to authors.
      The returned documents can only be processed easily if styles are used.
      Also, most times these documents aren’t supposed to use tables, numbering, or many other features.

      I *do* create custom toolbars and menus for those templates, and encourage authors only to use the available stuff.
      Often, the menu items or buttons look the same as the original items, but work differently (for example the numbering button might apply a numbered style, or the “File > Save” menu might check and change the file name according to some versioning scheme).
      This is easier for me than writing a long list of requirements on what is allowed or disallowed for any given document.
      And easier for the author because he doesn’t have to remember that long list.

      The user only runs into those limitations if he edits the document(s) I sent him (attached to the template I also sent him).

      In general, I keep as closely to the original “Standard” and “Formatting” toolbars as possible, and don’t try to keep users from customizing the interface.

      If they run into problems with my customizations, they have my telephone number and mail address (inserted at the top of every document) to discuss any limitations they run into.

      cheers Klaus
      [Earth] Germany Stuttgart

    • #640390

      In general, developers shouldn’t disable built-in menu items and toolbar buttons in Word or Excel. Being able to disable your own custom menu items and toolbar buttons is very useful, though. StuartR mentioned one example: macros that don’t work if no document is open. Of course, one can build a check into the macro and exit if there are no documents open, but disabling an item or button is more in line with the user interface.

      It’s different for Access, IMHO. If you build a complete “application” in Access, you don’t want the end user to be able to use menu options and toolbar buttons geared towards developers.

      • #640394

        <>

        I agree absolutely.

      • #640401

        Of course, one difference with Access is that there is really no generic Access application that requires all the toolbars and menus. Most of the built-in menubars are useful only to someone developing an application, not to the person actually using it.

      • #640402

        [indent]


        If you build a complete “application” in Access, you don’t want the end user to be


        [/indent] I’ve seen complete applications in Excel and Word that have had everything disabled except the custom menu bars.

        I think, that it all depends on what you are doing as to whether or not, menu items need to be disabled.

        If you are providing a template for layout and the like, then no, the menu items and toolbar buttons shouldn’t be disabled except in very unusual circumstances.

        If you are providing a complete solution in one package, then sure it may make sense to disable some/ all of the controls.

        • #640625

          We disable menu items and short cut keys (and it is important to remember those as well) for an application where documents are stored on the database. This is done to try to minimise the possibilities for a knowledgeable user to hack directly into the database. (Existing macros are stripped before a document is uploaded).

    Viewing 2 reply threads
    Reply To: Why disable menu items and buttons? (Any)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: