View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
alenhart[_2_] alenhart[_2_] is offline
external usenet poster
 
Posts: 8
Default multiple objects in single cell

Once upon a time (back in may), I started to find an answer to this
question but never really followed up on solving it.

I have a code that will name images based on their locations in a
spreadsheet, which works great until I have a situation where mulitple
images (objects) have ended up in the same cell. Someone helped me
create a code that would identify where an object lives and spits it
out into a new sheet, thus allowing me to do a conditional format and
find duplicate cell references. This works great if the two objects
are stacked perfectly on top of one another, but doesn't work if they
are beside or above each other.

Can anyone help me tweek this to find those too?


Sub FindImages()
Dim Shp As Shape
dim CurWks as worksheet
dim RptWks as worksheet
dim oRow as long


set curwks = activesheet
set rptwks = worksheets.add
orow = 1


For Each Shp In curwks.Shapes
rptwks.cells(orow,"A").value = shp.name
rptwks.cells(orow,"B").value = shp.topleftcell.address(0,0)
'rptwks.cells(orow,"C").value = shp.bottomrightcell.address(0,0)
orow = orow + 1
Next Shp
End Sub