Pulling Data from one workbook to another

Occasional Contributor
I know this question has been asked before but I'm very new to this so I'm having trouble following the lingo:

I want to pull Data from a workbook with a contract on (with no set name as diff contracts have different names) into another workbook with a table on. This table then converts into an email (which I am able to do).

However I'm having trouble trying to get the vba to copy the data from one cell in one book to another in the other book. I've tried a few codes but the latest I've been trying is:

ActiveWorkbook.Worksheets("Page One").Range("C3").Copy _

Any ideas or tips are very welcome, again I'm very new to this.
8 Replies


You don't need the .Value:

ActiveWorkbook.Worksheets("Page One").Range("C3").Copy _
Ah okay, I took that out but it's still throwing up an error 438


How about


ThisWorkbook.Worksheets("Pull").Range("C11").Value = ActiveWorkbook.Worksheets("Page One").Range("C3").Value
I tried that earlier but it threw up an error 9. I think it might be the ThisWorkbook and ActiveWorkbook causing the issue but because the contract workbook won't have an identical name I don't know what to call it in the code


Which workbooks are open when you run the code?

Which one of them is the active workbook?

It might help if you posted more of the macro.

That is the entire macro code which is probably where I'm going wrong, the two workbooks that would be open are: "Email Tool" and a contract that will have a different name each time but we can call "Contract" for the sake of this.

Started making this tool to learn how to macro as I have to learn by doing so apologies if I'm making basic mistakes.
Sorry - "Email Tool" is the one with the macro in and the data needs to be copied from "Contract"


So the Email Tool workbook should contain a worksheet named Pull.

The contract workbook should also be open in Excel. It should be the active workbook when you run the macro, and it should contain a worksheet named Page One.

If the name of the sheet might vary, but if you are sure that it will always be the first worksheet in the contract workbook, you might use

ThisWorkbook.Worksheets("Pull").Range("C11").Value = ActiveWorkbook.Worksheets(1).Range("C3").Value