simple vba code gives me run time error 91 object variable or with block not set

后端 未结 1 946
小鲜肉
小鲜肉 2020-12-02 01:36

So I have a simple little macro/sub defined when a command button is clicked. The problem is it gives me:

Run Time Error \'91\' : Object Variable or With Blo
相关标签:
1条回答
  • 2020-12-02 02:08

    You need Set with objects:

     Set rng = Sheet8.Range("A12")
    

    Sheet8 is fine.

     Sheet1.[a1]
    
    0 讨论(0)
提交回复
热议问题