+ Reply to Thread
Results 1 to 13 of 13

Macros Not Working

  1. #1
    Valued Forum Contributor
    Join Date
    07-16-2007
    Location
    GA
    Posts
    947

    Question Macros Not Working

    Hi Everyone,

    It appears that I changed my settings (accidentally) somewhere in Excel 2007 & now my pre-defined macros aren't working.

    As far as I can see, my macros are active & trusted. I must be missing something somewhere.

    How or where do re-activate my macros?

    Thanks
    MyCon
    -- Using Latest Version of Excel

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Macros Not Working

    Have you navigated to the Trust Center and verified that your security setting for macros is set correctly?

    Office Orb > Excel Options > Trust Center > Trust Center Settings > Macro Settings

    Or if you have the Developer Tab shown in the ribbon menu

    Develop Tab > Code Group > Macro Security

    Choose Disable macros with notification.

    If this is a work computer and you cannot change your macro security, then it is likely your IT department has applied a security policy to prevent you from making the change and you'll have to contact them for permission. If it is a home PC, then the above steps should suffice to get you going.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Valued Forum Contributor
    Join Date
    07-16-2007
    Location
    GA
    Posts
    947

    Re: Macros Not Working

    Hi,

    I checked my macro settings and "enabled" them & "Disable all macros with notifications", as you suggested.

    I am doing this on my home computer. If I create a new file & create macros, that seems to work.

    However, I open files with pre-defined macros, they are not functioning, even though my settings are the same.

    Occasionally, I receive some type of message about VB, but I'm not sure what it said.

    Any thoughts to get my macros enabled again?

    Thanks

  4. #4
    Forum Contributor johnjohns's Avatar
    Join Date
    11-19-2007
    Location
    Dubai, UAE
    MS-Off Ver
    2003 and 2007
    Posts
    526

    Re: Macros Not Working

    Palmetto has given the total solution. Please see if you get a security warning as shown in the attached picture.

    rgds

    johnjohns
    Attached Images Attached Images

  5. #5
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Macros Not Working

    With macro security set to "Disable with notifications", you will be prompted each and every time, when opening a workbook containing VBA code, to make a choice to enable (or not) macros. This is not a random process that works for some workbooks and not for others - it's all or none.

    What do you mean by "predefined" macros? All VBA code is "predefined" in the sense that it doesn't exist until it is written which, by definition, is the act of "defining" the code.

    As johnjohns shows via the image he uploaded, choose "Enable" when you get this prompt.

  6. #6
    Valued Forum Contributor
    Join Date
    07-16-2007
    Location
    GA
    Posts
    947

    Re: Macros Not Working

    Hi Palmetto & JohnJohns,

    Here's what I've done:

    I changed my settings per your instructions

    In a new file, I created a couple simplistic macros & save the file with "Excel Enable-Macros Workbook"

    Closed & Excel & reopened

    Now, I do get the security option message & selected enable macros

    These instructions seem to work great for new files created.


    However, I have a bunch of files that were created some time a go & have, what I call, "pre-define" macros. Meaning, I created the macros to primarily sort a bunch of rows or columns.

    Even after I close Excel & reopen it, I do not get the Security Option message.

    I even re-created my sort functions by creating another macro, Save the file.

    I'm trying to avoid having to re-create all my macros in my existing files.

    I attached a file for example.

    In this file, I have to command buttons.

    Here, you should be able to see my macro settings & advise what the correct settings are.

    I also added my primary directory as my trusted locations.

    Once, I am able to "enable" macros (permanently), I expect my macro issue will be resolved with my existing files that have macros in them.

    Thanks again for the assistance.
    Attached Files Attached Files

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,202

    Re: Macros Not Working

    The workbok is password protected
    Last edited by royUK; 10-24-2010 at 12:54 PM.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  8. #8
    Valued Forum Contributor
    Join Date
    07-16-2007
    Location
    GA
    Posts
    947

    Re: Macros Not Working

    Ooops,

    My Bad!! I took the password off.

    I just disvovered that I may have some encryption signature on, but I don't recall to shut it off, if I do. Perhaps, this is the issue.

    I reattached the file.

    At the moment, I am getting the security message & "enabling" macros.

    Thanks
    Attached Files Attached Files

  9. #9
    Valued Forum Contributor
    Join Date
    07-16-2007
    Location
    GA
    Posts
    947

    Re: Macros Not Working

    Hi,

    I now have marcros working in my Excel files or when I recreate new one's in the existing Excel files. Now, the problem is that "I see" the macros when I go to the Developer Tab & select macros. Now, the problem isthat I cannot select them to edit or delete.

    Any suggestions to get these active again? I'm trying to avoid having to remake/redefine all of them because some files have a lot of macros that I created.

    Thanks again

  10. #10
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,202

    Re: Macros Not Working

    Select Macros in the Developer Tab, then Edit

    All simply Alt+F11

    You seem to have an unnecessary number of empty modules

  11. #11
    Valued Forum Contributor
    Join Date
    07-16-2007
    Location
    GA
    Posts
    947

    Re: Macros Not Working

    Hi royUK,

    On my work computer my Excel files are working fine. I'll have to try this on my home computer & figure out what's configured differently.

    Hopefully, your suggestion helps to.

    Thanks

  12. #12
    Valued Forum Contributor
    Join Date
    07-16-2007
    Location
    GA
    Posts
    947

    Re: Macros Not Working

    Hi Everyone,


    I'm not sure what I did or didn't do, other than modifying my Excel settings to your suggestions, but all seems to be well at the moment.

    Thanks all to who assisted.

  13. #13
    Registered User
    Join Date
    10-12-2018
    Location
    RI, USA
    MS-Off Ver
    current
    Posts
    1

    Re: Macros Not Working

    I was having issue and had to "turn on" add-ins for the workbook that I was using as it was created by a company that provides template workbooks (accounting/audit)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1