Runtime Error 438

xcelnovice

Board Regular
Joined
Dec 31, 2011
Messages
81
So I am trying to slowly piece together a macro through trial and error (Mostly just error) Below is the very first part I need to accomplish & I get to here

wbTarget.Sheets("AB").Range("A:H").Paste 'Last line

And i get runtime error 438 Object doesnt support this property or method

I'm sure there are things in here that make no sense but Im trying to babystep through it..Thanks

1) Open both workbooks (target & source)

2)Copy range in source

3)Paste to target

Sub CostMgmtUpdate() 'Name of my program
Dim wbTarger As Workbook 'Cost Management report where data will be pasted
Dim wbSource As Workbook 'BTD File where data is pulled from
'Open both workbooks
Set wbTarget = Workbooks.Open("C:\Users\E7HP\Desktop\JH CLIN 0005 November 2015 SLIN Budget (CMS ART) vs Actuals (Costpoint)-COPY.xlsm")
Set wbSource = Workbooks.Open("C:\Users\E7HP\Desktop\JH A MIP-COPY.xlsx")
'Now transfer data from source to target

wbSource.Sheets("JH A MIP-COPY").Range("A:H").Copy

wbTarget.Sheets("AB").Range("A:H").Paste
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
The Range object doesn't have a Paste method. Yo can use the Copy method's Destination argument:

Code:
wbSource.Sheets("JH A MIP-COPY").Range("A:H").Copy wbTarget.Sheets("AB").Range("A:H")
 
Upvote 0

Forum statistics

Threads
1,216,747
Messages
6,132,483
Members
449,729
Latest member
davelevnt

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top