• Excel Macros

    Author
    Topic
    #1767467

    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

    Viewing 2 reply threads
    Author
    Replies
    • #1774909

      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.

    • #1774920

      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

    • #1775143

      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)

    Viewing 2 reply threads
    Reply To: Excel Macros

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: