ShelleyBelly
New Member
- Joined
- Mar 2, 2011
- Messages
- 44
Hi All,
I have the below code which sets the plotarea fill as a high res map of the world Jpg . My plan was to scale and offset to particular parts of the world to then add points over them.
The problem arrises when i try to scale as ".TextureTile = msoFalse" makes the above scaling and offset code redundant. I don't seem to be able to find the code for not tiling the image. From what I've read I believe it may be a bug.
An alternative (and possibly cleaner) approach would be to crop the image on import. Is there a method to do this without placing it on a sheet first?
Many thanks in advance,
Tom
I have the below code which sets the plotarea fill as a high res map of the world Jpg . My plan was to scale and offset to particular parts of the world to then add points over them.
Code:
Sub add_image_background()
Dim Cht As Chart: Set Cht = ActiveChart
'Image Dimensions 13317 x 7407
Dim Scl As Double: Scl = 0.1
With Cht.PlotArea.Format.Fill
.UserPicture "C:\Users\Bootcamp\Desktop\unnamed.jpg"
.TextureOffsetX = 0
.TextureOffsetY = 0
.TextureHorizontalScale = Scl
.TextureVerticalScale = Scl
.TextureTile = msoFalse
End With
End Sub
The problem arrises when i try to scale as ".TextureTile = msoFalse" makes the above scaling and offset code redundant. I don't seem to be able to find the code for not tiling the image. From what I've read I believe it may be a bug.
An alternative (and possibly cleaner) approach would be to crop the image on import. Is there a method to do this without placing it on a sheet first?
Many thanks in advance,
Tom