scotthannaford1973
Board Regular
- Joined
- Sep 27, 2017
- Messages
- 115
- Office Version
- 2010
- Platform
- Windows
Hi
I'm using the code below to basically select a part of a worksheet and paste it as an image to another part of the sheet - which is fine. What I cannot work out is how to include re-sizing - when pasted, I'd like the image to then become 75% of the pasted size. The issue is that when I copy an image it will become "Picture 1" and then the next "Picture 2" - and when I record the macro it will include "Picture 1" in the VB - so if i run it twice, it then errors as the newest image will be called "Picture 2" whereas the VB is thinking it's "Picture 1". Am I able to include code that will select the current image and apply a 75% re-sizing? Thanks in advance!
Sub GenerateLabel()
'
' GenerateLabel Macro
'
'
Range("BB1:BE8").Select
Selection.Copy
Range("D35").Select
ActiveSheet.Pictures.Paste.Select
End Sub
I'm using the code below to basically select a part of a worksheet and paste it as an image to another part of the sheet - which is fine. What I cannot work out is how to include re-sizing - when pasted, I'd like the image to then become 75% of the pasted size. The issue is that when I copy an image it will become "Picture 1" and then the next "Picture 2" - and when I record the macro it will include "Picture 1" in the VB - so if i run it twice, it then errors as the newest image will be called "Picture 2" whereas the VB is thinking it's "Picture 1". Am I able to include code that will select the current image and apply a 75% re-sizing? Thanks in advance!
Sub GenerateLabel()
'
' GenerateLabel Macro
'
'
Range("BB1:BE8").Select
Selection.Copy
Range("D35").Select
ActiveSheet.Pictures.Paste.Select
End Sub