I am trying to store pictures inserted into a worksheet of another workbook, from a folder to a Public Dictionary object, so that i can use it later for inserting to my Current Workbook sheet. I found a 64 bit code to import pictures from Excel Shapes to a Public Dictionary / Collection on this same site :
http://www.vbaexpress.com/forum/show...-picture/page2
which works most times and sometimes suddenly gives an Error on "CloseClipboard" :
- I am not sure but i think it may be happening because of Clipboard not closing quickly. So added a Do...DoEvents Loop Until H=0. It works most of the time, but still gives same error after loading a couple of Pictures from folder. How to tackle this issue?"1004. Application Defined or Object Defined Error."
- Once the Dictionary gets populated, i tried running a different Procedure to check if Dictionary was still populated. It maintained its contents until an error occurred. In which case, i have to run the "PicCollection" procedure again.
Question: How do i resolve the error of IPicture properties not getting populated?
Question: How do i insert the picture from the Dictionary or Collection to my Thisworkbook Sheet?
Here's the full code i am using. Maybe you will be able to quickly identify the root cause and suggest an appropriate solution :
Bookmarks