Plot Area Tile Picture Scale Offset Issues

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.

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
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,223,958
Messages
6,175,636
Members
452,662
Latest member
Aman1997

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top