Excel VBA Run-time Error '32809' - Trying to Understand it

后端 未结 18 869
长发绾君心
长发绾君心 2020-12-03 14:25

A colleague at work made some changes to one of our macro workbooks and now on my PC only I receive the dreaded Run-time Error \'32809\' when I attempt to run it. This lates

相关标签:
18条回答
  • 2020-12-03 15:05

    I have similar problem. The VBA (ActiveX) code had been working fine on 20+ computers for a few years, the problem suddenly surfaced out when one new colleague joined, the code doesn't work on his new laptop although the Excel version is same, it showed Run-time Error '32809'. I have checked all security settings of ActiveX and Macro, all correct. I did some experiments. I found the Code created in my computer will not work on my colleague's new laptop. However if I create code in my colleague's new laptop, it works in my computer. Once I saved this code in my computer, it won't be able work in my colleague's laptop any more.

    By checking the error in details, the problem is that all code written in my computer, my colleague's Excel won't recognize them. Debug>>Compile will show compile error, even "DIM ..." is not recognized.All the ActiveX Controls , Comboboxs, Buttons... the property-name were randomly assigned a new one. For example, I have a button name as [AddNew], once open in my colleague's new laptop, it is re-assigned as [commandbutton54] . It even can not recognize the existing worksheet name.

    After researched all the solutions , I found Delete "*.exd" file doesn't work(Even empty the recycle bin".). 'Add comments' doesn't work...

    In the end the solution is:

    Step1: Make a copy of the sheets with codes(sheets w/o code is not required),

    Step2: Delete the original sheets,

    Step3: Rename copied sheet to their original name,

    It starts to work. I found all ActiveX controls get back their original name in their property. It just took a minute. Hope it help those who are facing the same problem. Note: No need to save the file to *.txt or rename to xlsx...

    0 讨论(0)
  • 2020-12-03 15:06

    I suffered this problem while developing an application for a client. Working on my machine the code/forms etc worked perfectly but when loaded on to the client's system this error occurred at some point within my application.

    My workaround for this error was to strip apart the workbook from the forms and code by removing the VBA modules and forms. After doing this my client copied the 'bare' workbook and the modules and forms. Importing the forms and code into the macro-enabled workbook enabled the application to work again.

    0 讨论(0)
  • 2020-12-03 15:07

    I exported the VBA Module - resaved the file, then imported the module again and all is well

    0 讨论(0)
  • 2020-12-03 15:09

    Error 32,809: Copying the corrupt sheet to a new sheet and changing the name or deleting the corrupt sheet works for me. Additionally, I went to the SHEET Module of the corrupt sheet and removed the coding from the sheet Module associated with the corrupt sheet. That ALSO cured the problem for me. [ The sheet modules can have routines that are triggered by events specific to that worksheet.] So in my case, I think it was a corrupt Sheet Module, not corrupt data on the worksheet itself.

    0 讨论(0)
  • 2020-12-03 15:11

    My solution ( may not work for you)

    Open the application on a machine that is flagging the error. Change the VB code in some way. ( I added one comment line of code of no consequence into one of the macros)

    Sheets(sheetName).Select 'comment of no consequence

    and save it. This causes a recompile. Close and re-open - all fixed.

    Hope this makes sense and helps

    Grant

    0 讨论(0)
  • 2020-12-03 15:13

    Deleting all instances of *.exd resolved it for me.

    0 讨论(0)
提交回复
热议问题