Hi.
I've written some code that builds a catalogue with text and pictures.
The pictures are inserted as objects, by loading them in directly from the hard-drive.
In the code, I address the objects/images as an array of shapes.
Each object/image is loaded into the workbook twice - once in one worksheet and once in another.
The problem is, I want to import a lot of images in this way: approx. 1650 at the moment (with more added in the future.)
But when the macro gets to the 790th object (or there abouts), it stops and gives a Run-Time error '1004'.
It says it 'Cannot insert the object.'
At this point, each image has been loaded twice into the workbook (so the total number of embedded images may be effectively about 1580.)
Is there some kind of limitation to the number of objects or images that you can load into an Excel workbook?
This doesn't seem to be the result of my computer running out of memory, as I have tried to run the code on several different laptops (with different amounts of RAM) and the program always stops at about the same point - at approximately the 790th imported image.
I have also tried running the code on different versions of Excel: both Excel 2003 and Excel 2007.
The same thing happens in all cases.
Any help you could give me with this issue would be greatly appreciated.
Many thanks.
Bookmarks