• Save and close in a code module

    • This topic has 1 reply, 1 voice, and was last updated 2 years ago.
    Author
    Topic
    #2554214

    I am gradually working my way through the oddities of Excel 365 – solving most of them but this one has me stumped. Any help gratefully received.

    If I click on Save and Close everything works as you’d expect.

    If I put the code for that into a procedure and run it, a curious message pops up:

    Microsoft Office has identified a potential security concern.
    Automatic update of links has been disabled. If you choose to enable automatic update of links, your computer may no longer be secure. Do not enable this content unless you trust the source of this file.

    Then there are two buttons Enable and Disable

    Clicking either brings up uf a further message box titled Microsoft Visual Basic for Applications

    The actual message is a red circle with a white cross inside, and the text “400”. After clicking on OK the message box disappears but the code has not run.

    There are no links in this Workbook.

    Any ideas what’s going on – I am very confused !

    • This topic was modified 2 years ago by WSMartinM.
    Viewing 0 reply threads
    Author
    Replies
    • #2554221

      SOLVED !

      But bizarre !!

      I had imported the Ribbon customisations from a previous PC.

      For all my workbooks except one the Ribbon items referring to macros work fine.

      But for this one workbook I get the behaviour explained in my first post.

      Solution: I have deleted each reference to a macro, then simply put it back again. Now they all run properly from the Ribbon.

      I cannot spot why this one Workbook was treated differently, but its fixed so I won’t waste time working it out.

      Phew

    Viewing 0 reply threads
    Reply To: Save and close in a code module

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

    Your information: