Hello all,
I have a Rectangle shape that has a fixed size and will not change even if the column or row size changes.
It works as a frame to put information in like: tables, shapes, pictures and so on.
ThisWorkbook.Sheets("Sheet4").Shapes.Range("Rectangle 1")
I`m trying to find a way to copy everything that is inside that "frame" and export as a picture.
This code can copy the frame but nothing that is inside (for testing, I added a table).
When I manually press "past" it only adds the "frame"
Also the Export for some reason is not working.
Any idea how I could copy and export the whole range inside the shape?
I have a Rectangle shape that has a fixed size and will not change even if the column or row size changes.
It works as a frame to put information in like: tables, shapes, pictures and so on.
ThisWorkbook.Sheets("Sheet4").Shapes.Range("Rectangle 1")
I`m trying to find a way to copy everything that is inside that "frame" and export as a picture.
Code:
Dim ExportPath As String
Dim objRange As Object
ExportPath = ThisWorkbook.Path & "\Case.png"
Set objRange = ThisWorkbook.Sheets("Sheet4").Shapes.Range("Rectangle 1")
objRange.Select
Selected.Export FileName:=ExportPath, Filtername:="PNG"
This code can copy the frame but nothing that is inside (for testing, I added a table).
When I manually press "past" it only adds the "frame"
Also the Export for some reason is not working.
Any idea how I could copy and export the whole range inside the shape?