Selecting all objects in a dynamic range that is a single cell.

trl123

New Member
Joined
Sep 28, 2017
Messages
6
Hi all,
I am creating a database of instructions sheets which is formatted as a table and contains many diagrams. I am trying to get excel to return the required diagram to the original input work sheet based on a few parameters. I can get excel to select the required cell in the table, however I cannot get excel to select all the shapes in this single cell. This is the code I have tried so far which works for when the range contains more than one cell:
rowvalue from R1 is just a quick calculation that determines the required row number in the table
Code:
 Dim rowvalue As String
            rowvalue = Range("R1").Value
            Sheets("FS- Forge Data").Activate
            Dim dr As Range
            Set dr = Sheets("FS- Forge Data").Cells(rowvalue, 173)
                For Each shp In ActiveSheet.Shapes
                    If Not Intersect(Range(shp.TopLeftCell, shp.BottomRightCell), dr) Is Nothing Then _
                        shp.Select Replace:=False
                Next shp
            Selection.Copy
            Sheets("INPUT").Activate
            Range("Diagram_Part").Select
            ActiveSheet.Paste

Any help would be greatly appreciated.
Thanks a lot,
trl123
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,223,900
Messages
6,175,276
Members
452,629
Latest member
SahilPolekar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top