I need to copy a strip from an Excel spreadsheet that contains a graphic layout made with borders around some cells, with some background colors and text, and visualize this layout in a VBA image.
With the code below the cell range that makes up the figure is copied from the current spreadsheet to another one called "Image", and is copied as an image (as needed), but I could not find a way to place it in the " image ", or paste it directly into the" image "object (so the" Image "worksheet would be unnecessary).
Range("D19:H25").Select
Application.CutCopyMode = False
Selection.CopyPicture Appearance:=xlScreen, Format:=xlBitmap
Sheets("Imagem").Activate
Range("A1").Select
ActiveSheet.Paste
Inanattempttofindasolution,bymanuallyselectingthecellscontainingtheimage,andin"Home", "Copy as image" (appearance: as shown on the screen, and format: Bitmap); when you click on properties of the "image" object in the "Picture" field where "none" is described and paste in this field, the word "Bitmap" appears and the image "image" appears as desired.
I've tried and researched this same procedure in VBA, including doing it through macro and parsing the code, but evidently the part code that the deviation is done for VBA to "paste" the selected track into the VBA property object is not registered in the macro.
As the graphic schema is dynamically changed by the user (via VBA), whenever the user enters a certain form this "image" object needs to display the current image, how often the user wants to refine this image.
How do I resolve this the way I need it?