Results 1 to 15 of 15
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Florida, USA
    Posts
    394
    Thanks
    0
    Thanked 0 Times in 0 Posts

    What Macro? (Office 2000)

    Hello,

    I have several worksheets at work that when openned, gives me the message to either disable or enable macros. How can I tell what the macro is or does? I brought up Alt-F11 and it looks like blank boxes. Not being familiar with Macros, I'm not sure what I'm looking at or should be looking for.

    Thanks and Happy Holidays!
    Louise

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: What Macro? (Office 2000)

    In the Visual Basic Editor, look at the Project Explorer, that is the treeview on the left hand side that resembles the left hand pane of Windows Explorer.

    Expand the node corresponding to the active workbook. Double click ThisWorkbook and the nodes corresponding to each of the worksheets to see if there is code there.
    If there is a section named Forms or a section named Modules, that will cause the macro security warning.
    If the workbook is relatively old, it is possible that it contains macro sheets or dialog sheets as used in previous versions of Excel.

  3. #3
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Florida, USA
    Posts
    394
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: What Macro? (Office 2000)

    Hi Hans!
    I don't see any forms or modules. How would I delete the "macro"?

    Thanks Hans
    Louise

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: What Macro? (Office 2000)

    Try the following:
    - Activate the Visual Basic Editor (Alt+F11)
    - Activate the Immediate window (Ctrl+G)
    - Type ? ActiveWorkbook.Sheets.Count and press Enter.
    This should result in a number. Does it correspond to the number of sheets in your workbook, or is it larger?

  5. #5
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: What Macro? (Office 2000)

    In project explorer pane, dbl-click on each worksheet object and the thisworkbook object and delete any code from those sheets.

    Steve

  6. #6
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: What Macro? (Office 2000)

    Did you double click on the ThisWorkbook object and all worksheet objects as Hans said to do in his first reply and look for any code in each of those places?
    Legare Coleman

  7. #7
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Florida, USA
    Posts
    394
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: What Macro? (Office 2000)

    Hi,
    Sorry it took a little while to answer. Was involved in a project for the boss.

    Hans, I did what you said and the answer was 2 which corresponds with the number of sheets.
    Steve, I don't believe there is any code on the sheets (in the right pane) as they are blank.
    Legare, just had the chance to do it.

    Thanks
    Louise

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: What Macro? (Office 2000)

    I'm out of ideas for the moment. If you wish, you can post a copy of one of the workbooks. You can clear the contents of all cells in all worksheets, and zip the workbook if necessary.

  9. #9
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Florida, USA
    Posts
    394
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: What Macro? (Office 2000)

    Hi Hans,
    Hopefully the file is attached ok.

    Thanks
    Louise

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: What Macro? (Office 2000)

    The workbook contains a module named Module1 in the Modules section. Even though it doesn't actually contain code, it means that the "framework" for macros is present in the workbook.
    - Expand Modules in the Project Explorer (the treeview in the Visual Basic Editor).
    - Click on Module1.
    - Select File | Remove Module1...
    - Reply No to the question whether you want to export the module before removing it.
    - Switch back to Excel.
    - Save and close the workbook.
    Next time you open it, you shouldn't get the macro prompt any more.

  11. #11
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: What Macro? (Office 2000)

    You siad you had not modules in the workbook, but you do.
    Right-click Module 1
    choose "remove Module 1"
    Select <no> when asked to export.

    Even though the module has no code, its presence will trigger the macro warning.

    Steve

  12. #12
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Florida, USA
    Posts
    394
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: What Macro? (Office 2000)

    Hello,
    I also said earlier that I didn't know that much about Macros.

    The only "Module1" I see is under Personal.xls and not "this workbook". I want to keep the one under personal.xls so I did not touch that one. I don't see any other Modules under the current workbook only under the personal.xIs VBA project. Is that the one I delete?
    Louise

  13. #13
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Florida, USA
    Posts
    394
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: What Macro? (Office 2000)

    Hi Hans,
    Thank you very much. As you can see by my reply to Steve, I don't have a Modules section under the current workbook only under personal.xls. I'm not sure what I'm looking at so I may be wrong.

    Thanks again,
    Louise

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: What Macro? (Office 2000)

    The workbook you posted contains a module Module1. You will only see it if the workbook is open.

  15. #15
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Florida, USA
    Posts
    394
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: What Macro? (Office 2000)

    Hans & Steve,

    My apologies, I didn't look down far enough. The modules folder was "off screen". Duh. <img src=/S/doh.gif border=0 alt=doh width=15 height=15> I found it now.

    Thank you very much!
    Louise

Posting Permissions

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