Excel User Group
Microsoft Excel blogs, forums, files. Read, ask questions, provide answers.

Enable Macros Prompt but No Macros Exist!

Latest post Thu, Jul 29 2010 9:06 AM by Ali Kapasi. 10 replies.
  • Wed, Jul 28 2010 4:02 AM

    • Ali Kapasi
    • Top 75 Contributor
    • Joined on Wed, Feb 17 2010
    • London
    • Posts 9
    • Points 173

    Enable Macros Prompt but No Macros Exist!

    Hi,

     

    Now i only post on here once i've scoured the net for existing solutions, but this time have failed.

    I'm getting the Enable Maros prompt when opening a spreadsheet that's exported from our ORacle database, but the spreadsheet itself contains no macros, no code, no modules and no hidden/locked sheets.

    I can't include the actual spreadsheet as it has sensitive patient & staff data, but have got rid of everything and re-saved and attached that. Still has the enable macros prompt.

     

    Thanks in advance.

     

    Ali

    NHS Haringey.

    • Post Points: 21
  • Wed, Jul 28 2010 4:24 AM In reply to

    Re: Enable Macros Prompt but No Macros Exist!

    Ali,

    Excel will report macros even if you have some modules with no code in it.

     

    Debra has a web page on it at http://www.contextures.com/xlfaqMac.html#NoMacros

    Regards

    Bob

    • Post Points: 21
  • Wed, Jul 28 2010 4:57 AM In reply to

    • Ali Kapasi
    • Top 75 Contributor
    • Joined on Wed, Feb 17 2010
    • London
    • Posts 9
    • Points 173

    Re: Enable Macros Prompt but No Macros Exist!

    Thanks Bob, but already found that post and tried all her resolutions to no avail.  That's why i attached the actual file hoping that an awesome MVP would come to my rescue.

    It's not a 'be all and end all' and can easily work around it but it's more annoying then prohibiting.

    Thanks anyway Bob, much appreciated.

    • Post Points: 21
  • Wed, Jul 28 2010 6:15 AM In reply to

    Re: Enable Macros Prompt but No Macros Exist!

    It seems to be the Option Explicit lines in ThisWorkbook and the Sheet module. Remove them, save it, and it seems fine.

    Regards

    Bob

    • Post Points: 21
  • Wed, Jul 28 2010 8:23 AM In reply to

    • Omar
    • Top 10 Contributor
    • Joined on Sat, Jan 12 2008
    • Kitchener, ON
    • Posts 101
    • Points 1,512

    Re: Enable Macros Prompt but No Macros Exist!

    I couldn't find the Option Explicit lines. I looked everywhere I could and didn't find anything in the normal spots. For example, I've seen range names that referred to other spreadsheets do this, but deleting all the names didn't work.

    Something is strange in 2007 when I go to Office Button/Prepare/Inspect Document. It tells me there is a hidden sheet, but can't remove it. I don't know how to find that sheet.

    Omar Freeman Kitchener, ON

    • Post Points: 5
  • Wed, Jul 28 2010 8:30 AM In reply to

    • Omar
    • Top 10 Contributor
    • Joined on Sat, Jan 12 2008
    • Kitchener, ON
    • Posts 101
    • Points 1,512

    Re: Enable Macros Prompt but No Macros Exist!

    Further testing. The range names all referred to a sheet named "macro1". I ran this line of vba code to unhide that sheet.

    ThisWorkbook.Sheets("Macro1").Visible = xlSheetVisible

    Deleting the sheet was what it took. I take it the sheet had been set with the "very hidden" property at some point.

    Omar Freeman Kitchener, ON

    • Post Points: 21
  • Thu, Jul 29 2010 5:02 AM In reply to

    • Ali Kapasi
    • Top 75 Contributor
    • Joined on Wed, Feb 17 2010
    • London
    • Posts 9
    • Points 173

    Re: Enable Macros Prompt but No Macros Exist!

    Omar/Bob,

    The sheet had several names defined, i deleted them.

    Couldn't see any coding present such as Options Explicit, but i'm not at all VBA savvy so may not have been looking in the correct place.

    I'm using Excel 2003. Still not any closer to a solution i feel.

     

    • Post Points: 21
  • Thu, Jul 29 2010 7:09 AM In reply to

    Re: Enable Macros Prompt but No Macros Exist!

    Ali,

    I think the Option Explicit was a red herring, my VBIDE inserted them itself, you don't have them.

    YOu have to unhide the Macro1 sheet as Omar showed you, and then delete it. Deleteing the names is not sufficient.

    Regards

    Bob

    • Post Points: 21
  • Thu, Jul 29 2010 7:24 AM In reply to

    • Ali Kapasi
    • Top 75 Contributor
    • Joined on Wed, Feb 17 2010
    • London
    • Posts 9
    • Points 173

    Re: Enable Macros Prompt but No Macros Exist!

    Thanks Bob. I tried to do what Omar said but think i may have been doing it wrong.

    Could you provide an idiot's steb-by-step guide please?

     

    thanks,

    • Post Points: 21
  • Thu, Jul 29 2010 8:25 AM In reply to

    Re: Enable Macros Prompt but No Macros Exist!

    Okay.

    With your workbook open, go into the VBIDE - Alt-F11

    Make sure that the immediate windo is open - Ctrl-G

    In the immediate window, type

    Workbooks("Test File.xls").Sheets("Macro1").Visible = xlSheetVisible

    and then hit return

    Go back to Excel, Alt-F11


    The Macro1 sheet should now be visible, so you can delete it as normal

    Regards

    Bob

    • Post Points: 21
  • Thu, Jul 29 2010 9:06 AM In reply to

    • Ali Kapasi
    • Top 75 Contributor
    • Joined on Wed, Feb 17 2010
    • London
    • Posts 9
    • Points 173

    Re: Enable Macros Prompt but No Macros Exist!

    You're a star, you deserve a badge of some kind.

    thank you to you and Omar.

    • Post Points: 5
Page 1 of 1 (11 items) | RSS
Copyright Excel User Group and the relevant contributors, 2010. All Trade Marks acknowledged. This site is a peer-to-peer site and NOT affiliated in any way to Microsoft Corp. All rights reserved.