excel vba extract picture from arraylist -


i have placed variable number of pictures inside arraylist. each picture has own name (through named range). don't know how retrieve each image , insert them cells.

dim pic picture dim picarray object set picarray = createobject("system.collections.arraylist") each pic in activesheet.pictures     picname = differentnameeachtime     if pic.left = range(picname).left , pic.top = range(picname).top             picarray.add pic     end if next pic 

this works , can verified msgbox's. point of making activecell picture doesnt work

range("g3").select x = 0 each pic in picarray     set picobject = pic     msgbox pic.name     msgbox typename(pic)     activecell.offset(0, x) = pic (doesnt work)     activecell.offset(0, x) = picobject (doesn't work)     x = x + 1 next pic 

you need change picture's location of target cell. so:

pic.left = activecell.offset(0, x).left pic.top = activecell.offset(0, x).top 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -