Although it actually copies and pastes from one workbook or sheet to another, I keep getting the runtime error 1004: Pastespecial function of range class failed.
The code below does the task, but I still receive the error. I'm sure there is a better way to write the code, but I'm still very new and learning. What can I do to make things better?
Dim x As Workbook
Dim y As Workbook
Dim ws1 As Worksheet
Dim ws2 As Worksheet
'## Open both workbooks first:
Set x = Workbooks.Open("C:\Users\KimBush\Documents\NP Credentials Project\Greater than 30 days project\Macro Testing\NPPIndependentStatusReport")
Set y = Workbooks.Open("C:\Users\KimBush\Documents\NP Credentials Project\Greater than 30 days project\Macro Testing\DKC-IKC NP Credentialing Update Testing")
'Now, copy what you want from x:
Set ws1 = x.Sheets("Sheet1")
Set ws2 = y.Sheets("Source")
'Now, paste to y worksheet: