使用VBA将单元格从Excel中的一个工作簿复制到另一个工作簿

时间:2019-01-11 05:51:24

标签: excel vba excel-vba-mac

工作簿1是我必须从中选择值的数据,而工作簿是各个单元格中的目标书

Workbook1

enter image description here

Workbook2

enter image description here

1 个答案:

答案 0 :(得分:0)

您可以尝试:

    Dim wb1 as workbook, wb2 as workbook    

    Set wb1 = workbooks("Workbook1")
    Set wb2 = workbooks("Workbook2")

    wb1.range("Cell to be copied").copy wb2.range("Cell where you want the data")