VBA copies cell instead of graph even though they are selected

Benzoli7

Board Regular
Joined
Jan 11, 2010
Messages
136
Can anyone help me with this?

I have code that is setup to select and copy several graphs and paste them as a picture in another workbook. When I step through the code with the editor I can see that the code selects all of the graphs, but copies an individual cell instead. I get a 1004 error when the code reaches the paste section of the code. I assume this is because the code has copied a cell instead of something that can be pasted as a picture. I copied this code from another workbook that does the exact same thing and it works perfectly.

Here is the code.

HTML:
wB.Activate
    Sheets.Add(After:=Sheets(Sheets.Count)).Name = "AIPC"
    
    
       Windows("LTL SHIPMENT HISTORY DATA WORKSHEET").Activate
       
 
         Application.Run "'LTL SHIPMENT HISTORY DATA WORKSHEET.xlsm'!AIPC"
 
    ThisWorkbook.ActiveSheet.Shapes.Range(Array("A", "B", "C", "D", "E")).Select
      Selection.Copy
 
    wB.Activate
    Sheets("AIPC").Select
    Range("A3").Select
    ActiveSheet.PasteSpecial Format:="Picture (JPEG)", Link:=False, _
        DisplayAsIcon:=False
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,224,526
Messages
6,179,322
Members
452,906
Latest member
Belthazar

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