Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multiple colums into a single cell | Excel Discussion (Misc queries) | |||
Multiple formats in a single cell with multiple formulas | Excel Worksheet Functions | |||
Multiple hyperlinks in a single cell | Excel Discussion (Misc queries) | |||
Single or Multiple Cell Selection | Excel Programming | |||
Multiple formats for a single cell value. | Excel Worksheet Functions |