Excel VBA: Loop through cells and copy values to another workbook

前端 未结 2 779
执念已碎
执念已碎 2020-12-09 23:53

I already spent hours on this problem, but I didn\'t succeed in finding a working solution.

Here is my problem description:

I want to loop t

2条回答
  •  执念已碎
    2020-12-10 00:24

    Workbooks("My_WB_2").Worksheets(CStr(Group.Value)).CurCell_2.Value
    

    This will not work, since CurCell_2 is not a method of Worksheet, but a variable. Replace by

    Workbooks("My_WB_2").Worksheets(CStr(Group.Value)).Range("B4").Value
    

提交回复
热议问题