Reference to Window Object in VBA

前端 未结 2 1582
醉梦人生
醉梦人生 2020-12-20 03:03

I have a problem referencing a windows object in VBA. it throws the following error: \"Error 5 (Invalid procedure call or argument). I cannot find the cause, because I see n

2条回答
  •  悲&欢浪女
    2020-12-20 03:26

    Something odd with that interface, it seems to only work with a copy of the control variable so:

    Set winn = wins.Item(i + 0)
    

    or

    Set winn = wins.Item((i))
    

提交回复
热议问题