Results 1 to 4 of 4

Thread: Excel Macros

  1. #1
    art
    Guest

    Excel Macros

    A co-worker and myself were experimenting with creating macros in an Excel workbook. The workbook was one that has a large listing of part numbers and prices. Anyway, we decided NOT to use a macro to do the desired function, so we deleted the macro (and we do not have any other macros in the file). However, now each time we open the Excel file, we get the dialog box that asks if it is "OK to enable macros". The dialog box is sort of a nuisance and we would like to get rid of it. When we look in the Macro dialog box, there are no macros listed. Is there a way to get rid of the "OK to enable Macros" box?

    Thanks for any help you can offer!

    abartle@paramount-lighting.com

  2. #2
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel Macros

    Tools/macros/Security will allow you to disable the warning by default - if that is what you want ?

    Otherwise,
    You may have deleted the macro but left the module which probably makes Excel believe there is a macro in the worksheet.
    From the VB Editor, in the project viewer, select the Module (probably Module1) then go File/Remove Module1.

  3. #3
    2 Star Lounger
    Join Date
    Dec 2000
    Location
    eastern Connecticut, Connecticut, USA
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel Macros

    Leif's suggestion regarding a residual module is probably your problem, but if it isn't, you may have inadvertently activated one of the Workbook or Worksheet event stubs.
    In the VBE, select the workbook and each sheet in turn and make sure you don't have a stub that got generated during your 'experimenting'. Example might look like:
    Private Sub Worksheet_SelectionChange(ByVal Target as Excel.range)
    End Sub

  4. #4
    New Lounger
    Join Date
    Jan 2001
    Location
    fl
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel Macros

    I had that problem once. I couldn't find the module OR the stub so i just Highlighted all the used cells and "copy"ed it then "paste"d it into a new workbook. Then i deleted the original and renamed the new one with the original file name and that cleared it right up. (i know it's a novice solution but it got me out of trouble)

Posting Permissions

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