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

后端 未结 18 885
长发绾君心
长发绾君心 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...

提交回复
热议问题