Results 1 to 3 of 3
  1. #1
    3 Star Lounger MacroAlan's Avatar
    Join Date
    Feb 2003
    Location
    St Louis, Missouri, USA
    Posts
    254
    Thanks
    6
    Thanked 1 Time in 1 Post

    Removed Modules (VBA/Excel/XP)

    We removed the modules from a large workbook, then saved and closed. When it is re-opened, it still asks users to Enable Macros.

    What else can we do?
    Alan

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Removed Modules (VBA/Excel/XP)

    Right click on each sheet tab, select View Code, and if you find any code delete it

    Typically you might find code like the following :<pre> Private Sub CommandButton1_Click()

    End Sub</pre>


    This would result from placing an Button from the control toolbox on the worksheet and clicking it.

    Regards,

    Andrew C

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

    Re: Removed Modules (VBA/Excel/XP)

    Activate the Visual Basic Editor (Alt+F11)
    Expand the workbook in the Project Explorer.
    Under Microsoft Excel Objects, you'll see a list of all sheets in the workbook, and a ThisWorkbook item.
    There is a module associated with each of these.
    Make sure that all of those are empty.

    Also make sure that there are no sections named UserForms or Modules for this workbook.

    If you still get the error, it's possible that the workbook contains old-fashioned macro sheets or dialog sheets.

Posting Permissions

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