VbComponents.Remove doesn't always remove module

后端 未结 8 913
我寻月下人不归
我寻月下人不归 2021-01-02 01:01

I\'m trying to use Chip Pearson\'s code for overwriting an existing VBA code module with an import from another project. Original code here.

The particular section

8条回答
  •  臣服心动
    2021-01-02 01:20

    I have ran into things like this before. The 'DoEvents' command often helps. Have you given that a shot?

    Other times, I have placed the command in a do while loop and used a boolean to continually check if the command in question has succeeded. Including the DoEvents command in the loop is sometimes needed.

    Just remember to put something in the loop so that after so many cycles it will give up. Getting stuck in an infinite loop can be pesky.

提交回复
热议问题