Vba copy paste values

gldurand

Board Regular
Joined
Jun 8, 2006
Messages
178
Office Version
  1. 2016
Platform
  1. Windows
Hi All,

I have the following VBA Code that copy/paste from 1 workbook to the other, but I want it to copy/past values

any ideas??

Dim wb1 As Workbook, wb2 As Workbook

Set wb1 = Workbooks("Master - CSAM Global Dashboard 2018.xlsm")
Set wb2 = Workbooks("2018 Major Outages 1.0.xlsm")

wb2.Sheets("Major Outage Tables").Range("B21:L35").Copy Destination:=wb1.Sheets("MO Tables RFO CAT0").Range("B3")
wb2.Sheets("Major Outage Tables (2)").Range("B1:H19").Copy Destination:=wb1.Sheets("MO Tables RFO CAT0").Range("B47")
wb2.Sheets("Major Outage Tables (3)").Range("B34:L44").Copy Destination:=wb1.Sheets("MO Tables RFO CAT0").Range("B20")
wb2.Sheets("Major Outage Tables (3)").Range("B47:K58").Copy Destination:=wb1.Sheets("MO Tables RFO CAT0").Range("B34")
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
How about
Code:
Wb1.Sheets("MO Tables RFO CAT0").Range("B3:L17").Value = Wb2.Sheets("Major Outage Tables").Range("B21:L35").Value
Both ranges need to be the same size
 
Upvote 0

Forum statistics

Threads
1,223,723
Messages
6,174,123
Members
452,546
Latest member
Rafafa

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