VBA code to copy objects

szymq

New Member
Joined
Dec 18, 2018
Messages
3
Hello,

If possible, I would like to improve my code to be able to copy and paste all data in the sheet, including objects and attachments. Right now it looks like this:

With WBPrepaid.Sheets("Usage Summary")
.Activate
.Range("A1:Az150").Copy
WBExport.Sheets("Usage Summary").Range("A1").PasteSpecial xlPasteAll

I am not familiar with VBA, just changing macro created by my colleague.

I would appreciate any help!
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hello,

When you are talking about Objects ...

Are you dealing with Shapes, Pictures, Charts or .... ?
 
Upvote 0
Hello,

You could test following:

Code:
Sub SelectAll()
ActiveSheet.Pictures.Select
ActiveSheet.Shapes.SelectAll
End Sub

Hope this will help
 
Upvote 0
Thank you!

Could you please show me, how the complete code should look like?

No problem ...

Could you please post your current macro ( complete code... too ) :wink:
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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