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

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
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,223,886
Messages
6,175,191
Members
452,616
Latest member
intern444

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