Embedded Excel File

vbakid

New Member
Joined
Sep 19, 2010
Messages
5
Hello,

I need some help with embedded excel files within my excel spreadsheet. I have one worksheet within my (master) workbook in which there are multiple (upto 20 Max, min 3) embedded excel files. What I want to do is open each embedded file from that sheet and copy the sheets from the embedded file where cell A1 = Yes into my master workbook.

I.e. Master workbook contains sheets:
Instructions
SheetWithEmbeddedFiles - Which contains the embedded xlsm files

Each embedded xlsm file is of the same format, just the contents will vary. If A1 = yes, then copy that sheet into my master so the master now contains:

Instructions
SheetWithEmbeddedFiles - Which contains the embedded xlsm files
SheetFromEmbedded1
SheetFromEmbedded2 etc etc

I was able to open one of the workbooks through this
Code:
Worksheets("SheetWithEmbeddedFiles").Shapes(1).OLEFormat.Activate
but then I'm at a loss on how to copy the sheets from it and move on to the next embedded file.

Can someone please help? This is the last thing I need to do for my program and it seems to be the biggest hurdle :mad:

All help would be much appreciated, thank you
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

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