Removing reference to the VBIDE

  • Hi,

    Ive got a spreadsheet that is essentially calculation based, reporting on a live view of a database. I have a small bit of code in it that allows an offline snapshot copy of itself to be saved so that it can be distributed.

    The problem I have is that I want to remove the code from this snapshot to prevent it triggering Excels virus protection. In itself that's not a problem, the difficulty I have is that unless the reference to the VBIDE is removed it still triggers the virus protection.

    In itself, the code to remove the reference works fine, but when it is combined witht the code that removes itself I get a compile error.

    Any ideas?.

  • Re: Removing reference to the VBIDE

    Personally I would actually export the worksheets to a "clean" workbook with no code & use this as the info to be distributed. It will save you all sorts of issues.

    Here, for example, you are essentially running some code that tries to delete itself :yikes: You will find that this is not possible.

  • Re: Removing reference to the VBIDE

    Thanks Will, I think you're right. I was trying to avoid that as the workbook has charts and controls that like to reposition/reformat themselves when they are copied over.

    It's a shame as the code that removes itself works fine - it's just that :censored: reference to the VBIDE.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!