mcomp72
Active Member
- Joined
- Aug 14, 2016
- Messages
- 275
- Office Version
- 365
- 2019
- 2016
- 2011
- Platform
- Windows
- MacOS
I have some code that copies a range of cells from one sheet to another.
I used the Copy method, as I need it to copy cell formatting, formulas, etc.
It works fine, except for one thing -- there are some images that exist on the sheet that are also being copied by this line of code, and I don't want them to be, at least not all of them. Is there a way to stop the images from being copied using the above line of code? If not, is there another way to do the copy which will copy all the cell formatting, formulas, etc, but not the images? I could right separate code to copy the images I want to be copied.
FYI - My workbook needs to work on both Windows and Mac.
VBA Code:
sourceWS.Range(FirstCol & FirstRow & ":" & LastCol & LastRow).Copy targetWS.Range(FirstCol & FirstRow & ":" & LastCol & LastRow)
I used the Copy method, as I need it to copy cell formatting, formulas, etc.
It works fine, except for one thing -- there are some images that exist on the sheet that are also being copied by this line of code, and I don't want them to be, at least not all of them. Is there a way to stop the images from being copied using the above line of code? If not, is there another way to do the copy which will copy all the cell formatting, formulas, etc, but not the images? I could right separate code to copy the images I want to be copied.
FYI - My workbook needs to work on both Windows and Mac.