[EuropeMap] Hiding words when zoom out

Montague26

New Member
Joined
Dec 6, 2015
Messages
14
21L8X4.png


Here's my excel Europe map and there is some province that will named(and showed in map).
And I have a problem, I want to hide those words when I zoom out, and it show name when I zoom in the map.

Any way to do this?
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Depends on how the label appears on the workbook and what sort of trigger event you'd like to use.

There isn't a worksheet or workbook event for changing the zoom level of your window. Worst case scenario, you could tie a subroutine to the selection_Change event of either the worksheet or the workbook.

If you're putting the text within a shape (i.e. Rectangle, Oval, etc...) you could call this sub from your change event.
Code:
Sub CheckZoom()
Dim nShape As Shape
Dim iVis As Integer
    
If ActiveWindow.Zoom < 50 Then
    iVis = 0    'msoFalse
Else
    iVis = 1    'msoCTrue
End If


For Each nShape In ActiveSheet.Shapes
    nShape.Visible = iVis
Next nShape


End Sub
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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