Consulting

Results 1 to 15 of 15

Thread: Solved: Avoid macro security warnings!

  1. #1
    VBAX Regular
    Joined
    Mar 2005
    Posts
    13
    Location

    Solved: Avoid macro security warnings!

    Hello everyone:

    This is my first thread, I know nothing about VBA programming, however, I have every intention of learning has much as possible.

    My first question is does anyone know what the code would be for a word document - Avoid macro security warnings! I am very aware that this would only be for the macros which I have created on my system.

    http://www.vbaexpress.com/forum/arti...rticle&artid=3

    Second question is, what is the best possilbe way and cleanest method to deleting a VBA/Macro from a document, once you no longer need it.

    Thanks you very much!

    Denise
    Life is so much better when we can learn from each other.

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    1) There is no code to avoid the macro security warning, but you can add a digital signature. Just follow the instructions in the article.

    2) Just delete the code (highlight it and delete). If you no longer need the module you can right click it and remove it entirely.

  3. #3
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    Hi Denise,

    I'm not quite sure what you're asking here. You cannot disable macro security warnings in code - that would defeat the point of them, they are there so that code cannot run without the User's permission. What is it in the article you are having trouble with?

    The answer to the second question depends on where the macro is and whether there are any other macros in the same place. If the code is in a standard module and there is no other code there then remove the module; if it is in the ThisDocument module then select it and delete it - you can't remove the module.

    I see Jake beat me to it. I'm glad we said the same thing!

    Oh, My! Isn't that clever! I thought I was adding a new post and the site merged it on to my last one. Smart coding by someone. Well done!
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  4. #4
    VBAX Regular
    Joined
    Mar 2005
    Posts
    13
    Location

    Avoid macro security warnings!

    Hello Mr. Jollans, DRJ:

    I do apologise to the both of you, if I was incorrect with my first question.
    I was able to get through most of the procedure for Avoid macro security warnings!

    However, I stumbled with the third image, if you look to the right hand side of the image there is this coding, do I need to create this, or is the coding just a part of the file, which is used for the sample?

    As for the second question, thanks for letting me know, I used the Macro "Alt F8 command and just delete the macro from the Macro box.

    Thanks for your support!

    Denise

  5. #5
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    Hi Denise,

    The coding is just part of the file used for the sample - you sign your own projects with your own code.
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  6. #6
    VBAX Regular
    Joined
    Mar 2005
    Posts
    13
    Location
    Hello Mr. Jollans:

    Thank you for your quick reply, hopefully I will be up to speed, with the VBA lingo soon!

    Appreciate your support!

    Denise
    Life is so much better when we can learn from each other.

  7. #7
    VBAX Mentor
    Joined
    Sep 2004
    Location
    Nashua, NH, USA
    Posts
    489
    Location
    Quote Originally Posted by dillon65
    Hello everyone:

    This is my first thread, I know nothing about VBA programming, however, I have every intention of learning has much as possible.

    My first question is does anyone know what the code would be for a word document - Avoid macro security warnings! I am very aware that this would only be for the macros which I have created on my system.

    http://www.vbaexpress.com/forum/arti...rticle&artid=3

    Second question is, what is the best possilbe way and cleanest method to deleting a VBA/Macro from a document, once you no longer need it.

    Thanks you very much!

    Denise
    in word 2003 Help, see the following topics:

    Macro security levels
    About template locations

    It is alleged that macros in "trusted locations" are not subject to the security restrictions.

  8. #8
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    Howard,

    This has always (since 97 anyway) been the case and, to my mind, is an appaling hole. Any program can (and always could) write to such "trusted locations" without asking the User, and have code triggered to run on Office apps startup. This tends to happen on product install but can happen at any time.

    I did notice that Microsoft have started to admit it. I suppose that's a step in the right direction.
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  9. #9
    VBAX Mentor Brandtrock's Avatar
    Joined
    Jun 2004
    Location
    Titonka, IA
    Posts
    399
    Location
    Quote Originally Posted by TonyJollans
    Howard,

    This has always (since 97 anyway) been the case and, to my mind, is an appaling hole. Any program can (and always could) write to such "trusted locations" without asking the User, and have code triggered to run on Office apps startup. This tends to happen on product install but can happen at any time.

    I did notice that Microsoft have started to admit it. I suppose that's a step in the right direction.
    A M$ application with a gaping security hole? Well, I never!!
    Brandtrock




  10. #10
    VBAX Mentor
    Joined
    Sep 2004
    Location
    Nashua, NH, USA
    Posts
    489
    Location
    Quote Originally Posted by TonyJollans
    Howard,

    This has always (since 97 anyway) been the case and, to my mind, is an appaling hole. Any program can (and always could) write to such "trusted locations" without asking the User, and have code triggered to run on Office apps startup. This tends to happen on product install but can happen at any time.

    I did notice that Microsoft have started to admit it. I suppose that's a step in the right direction.
    There's other holes, but we should not be discussing them. I thought that the charter of VBAEXpress forbade such discussions anyway. Has that changed?

    One of the points of .NET is that Office security settings are ignored and the "real" security of .NET is applied instead when automating an office app with, say, VB .NET.

    Sew, eye expect that we will see a drastic change to the Office security model when office is fully .net-ized.

  11. #11
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    Quote Originally Posted by Howard Kaikow
    There's other holes, but we should not be discussing them. I thought that the charter of VBAEXpress forbade such discussions anyway. Has tat changed?
    I don't see any problem with discussing, and making people aware of, security issues. What we have agreed not to do is tell people how to break security that is in place (however weak), for example by cracking passwords.

    Anyway, it was you who brought it up!!
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  12. #12
    VBAX Mentor
    Joined
    Sep 2004
    Location
    Nashua, NH, USA
    Posts
    489
    Location
    Quote Originally Posted by TonyJollans
    I don't see any problem with discussing, and making people aware of, security issues. What we have agreed not to do is tell people how to break security that is in place (however weak), for example by cracking passwords.

    Anyway, it was you who brought it up!!
    dillon65 brought it up.

  13. #13
    VBAX Mentor Brandtrock's Avatar
    Joined
    Jun 2004
    Location
    Titonka, IA
    Posts
    399
    Location
    Quote Originally Posted by Howard Kaikow
    in word 2003 Help, see the following topics:

    Macro security levels
    About template locations

    It is alleged that macros in "trusted locations" are not subject to the security restrictions.
    dillon65 brought up macro security, you brought up the hole.
    Brandtrock




  14. #14
    VBAX Mentor
    Joined
    Sep 2004
    Location
    Nashua, NH, USA
    Posts
    489
    Location
    Quote Originally Posted by Brandtrock
    dillon65 brought up macro security, you brought up the hole.
    Tony brought up the first hole, I brought up the 2nd hole.
    16 more and we can play golf.

  15. #15
    VBAX Mentor Brandtrock's Avatar
    Joined
    Jun 2004
    Location
    Titonka, IA
    Posts
    399
    Location
    Fore!!
    Brandtrock




Posting Permissions

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