What causes Error 70 in Excel VBA?

后端 未结 4 701
逝去的感伤
逝去的感伤 2021-01-24 04:26

I have some code which keeps causing an

Error 70: Permission Denied

in my VBA code. I can\'t work out why, because I know that the worksheet i

4条回答
  •  情书的邮戳
    2021-01-24 04:42

    "Permission Denied" is not for a protected worksheet but for wrong access to a property or variable.

    I believe that "sh" is null at the point you are trying to access it and set its "Name" property. try to see if you initialized it correctly before setting its properties.

提交回复
热议问题