简体   繁体   中英

Copying the cell from One workbook to another workbook in excel using vba

Workbook 1 is the data from where i have to pick the value and workbook is the destination book in the respective cell

Workbook1

在此处输入图片说明

Workbook2

在此处输入图片说明

You can Try:

    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")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM