Results 1 to 11 of 11

Thread: How do I get the 'Enable Macros' command to automatically work?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2006
    Posts
    25

    How do I get the 'Enable Macros' command to automatically work?

    How do I get the Macros to enable upon opening the workbook instead of always having to "enable" them?

  2. #2
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: How do I get the 'Enable Macros' command to automatically work?

    Tool Menu > Macros > Security set it to LOW.

    But this can open you up to attacks.
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2006
    Posts
    25

    Re: How do I get the 'Enable Macros' command to automatically work?

    I did this and it still gives me the prompt box to enable macros....is there a code that can be used to stop the box from prompting and enable automatically?

  4. #4
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: How do I get the 'Enable Macros' command to automatically work?

    ???
    It still prompts you?

    are you sure you set it to low?

    there is no way to automatically enable... that would be a security risk.

    you can put an xls in the XLStart folder and that wokbk will run macros without being prompted... what is it you need to happen when it opens?
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jul 2006
    Posts
    25

    Re: How do I get the 'Enable Macros' command to automatically work?

    The file has command buttons for people in my office to pick what they need to see or accomplish. The macros are nothing more than copying and pasting functions. I just know the people who will be using it will not understand or complain they have to "Enable" the macros before using the functions

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: How do I get the 'Enable Macros' command to automatically work?

    You need to set it to Low and close Excel. Then reopen the workbook and you should not get the prompt. Yes, its not possible to do via code as it defeats the purpose of having security.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7
    Fanatic Member Comintern's Avatar
    Join Date
    Nov 2004
    Location
    Lincoln, NE
    Posts
    826

    Re: How do I get the 'Enable Macros' command to automatically work?

    You can always sign your code with a certificate, and have the users install the certificate on their machines (it’s basically just a matter of double-clicking it in explorer and hitting ‘OK’). Check out the tutorial here.

  8. #8
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: How do I get the 'Enable Macros' command to automatically work?

    Yes and I have one too located here - http://vbforums.com/showthread.php?t=285212

    But the problem with using SelfCert.exe is that it is machine dependant. If you distribute the private cert than it becomes invalid on another system as the validation is a hardware hash. so a different system will generate a different hash and not validate.

    A public purchased cert may be required if your distributing it.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  9. #9
    Fanatic Member Comintern's Avatar
    Join Date
    Nov 2004
    Location
    Lincoln, NE
    Posts
    826

    Re: How do I get the 'Enable Macros' command to automatically work?

    Quote Originally Posted by RobDog888
    But the problem with using SelfCert.exe is that it is machine dependant. If you distribute the private cert than it becomes invalid on another system as the validation is a hardware hash. so a different system will generate a different hash and not validate.
    Interesting. Was this a recent Office change? I do this all the time at work haven't had any problems (Office & Windows 2K).

  10. #10
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: How do I get the 'Enable Macros' command to automatically work?

    Im not sure if its only with Office 2003 and newer but I have had to trouble shoort this same situation with another member and I remember reading a footnote somewhere on MS stating so. It was stated that the selfcert.exe needed to be instaled on each station from the Office CD modify install and generate a cert on each.

    It did seem odd but I'll look for it again.

    Maybe it is just for being a fully trusted cert being installed in the trusted root authorites store or such.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  11. #11
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: How do I get the 'Enable Macros' command to automatically work?

    Quote Originally Posted by MS
    Note Digital signatures that are created with the SelfCert.exe program are for personal use only. They are not meant for commercial distribution of VBA macro solutions. The type of certificate that is generated does not verify your identity.

    For public distribution, you will need to purchase a valid certificate from a Certification Authority (CA). The certificates generated in this tutorial are test certificates and should be used for testing purposes only. They should not be used to code sign files that will be publicly distributed. This is because since the certificates are not issued by a CA whose root certificate is already trusted on a user's machine, the test certificate will not validate correctly on the user's machine. Independent software vendors can obtain valid certificates from VeriSign, GTE, or other certification authorities to digitally sign code files that will be distributed to the public.
    Something along that quote shows that they are not distributable and why I suggested installing SelfCert.exe on each machine with Office.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

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



Click Here to Expand Forum to Full Width