Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default multiple objects in single cell

So I have a macro that renames images in the sheet based on their
topleftcell property. and it works perfectly, except where there are
mulitple images in the same cell. the problem comes when I cannot find
those multiple images.
Someone along the way helped me with this code:

Sub FindImages()
Dim Shp As Shape
Dim Msg As String
For Each Shp In ActiveSheet.Shapes
Msg = Msg & Shp.Name & vbTab & Shp.TopLeftCell.Address(False, False) &
vbLf
Next Shp
MsgBox Msg
End Sub

but the results get posted in a msg box and I need them to go into a
new sheet so I can scroll through the hundreds of them and find which
one is causing my pain.

Can someone help me do that, or give me a better idea of finding where
the mulitple images exist?

thank you.
Anne

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default multiple objects in single cell

Maybe reporting to a new worksheet would be better???

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

alenhart wrote:

So I have a macro that renames images in the sheet based on their
topleftcell property. and it works perfectly, except where there are
mulitple images in the same cell. the problem comes when I cannot find
those multiple images.
Someone along the way helped me with this code:

Sub FindImages()
Dim Shp As Shape
Dim Msg As String
For Each Shp In ActiveSheet.Shapes
Msg = Msg & Shp.Name & vbTab & Shp.TopLeftCell.Address(False, False) &
vbLf
Next Shp
MsgBox Msg
End Sub

but the results get posted in a msg box and I need them to go into a
new sheet so I can scroll through the hundreds of them and find which
one is causing my pain.

Can someone help me do that, or give me a better idea of finding where
the mulitple images exist?

thank you.
Anne


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple colums into a single cell Tony S.[_2_] Excel Discussion (Misc queries) 8 February 18th 09 10:00 PM
Multiple formats in a single cell with multiple formulas Zakhary Excel Worksheet Functions 1 May 2nd 08 12:08 AM
Multiple hyperlinks in a single cell lorildemarco Excel Discussion (Misc queries) 3 August 7th 06 08:02 PM
Single or Multiple Cell Selection PosseJohn Excel Programming 2 November 27th 05 06:17 PM
Multiple formats for a single cell value. Carlos Excel Worksheet Functions 1 October 7th 05 12:44 AM


All times are GMT +1. The time now is 11:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"