# Visual Basic > Visual Basic 6 and Earlier >  [RESOLVED] Zoom with + -

## luca90

Based the image.

i have image1 with + icon and image2 have with - icon

between the image have a label named lzoom

i need to show in label the value when i click on the 2 imsges

note:
the max range of zoom is from 15 to 21

----------


## Arnoutdv

Have a private variable named m_lZoomLevel
In the Click event of image "+" do increase the zoomlevel, in the the Click event of image "-" decrease the zoomlevel.
After increasing/decreasing call your zoom function.

----------


## baka

al form_load


```
lzoom.Caption = 15
```

in image1_Click() u have



```
Dim v&
v = CLng(lzoom.Caption)
if v < 21 then lzoom.caption = v + 1
```

and the other


```
Dim v&
v = CLng(lzoom.Caption)
if v > 15 then lzoom.caption = v - 1
```

----------


## Zann

```
Option Explicit

Dim MyZoom As Integer

Private Sub Form_Load()
    MyZoom = 15
    lzoom.Caption = CStr(MyZoom)
End Sub

Private Sub Image1_Click()
    If MyZoom < 21 Then
        MyZoom = MyZoom + 1
        lzoom.Caption = CStr(MyZoom)
    End If
End Sub

Private Sub Image2_Click()
    If MyZoom > 15 Then
        MyZoom = MyZoom - 1
        lzoom.Caption = CStr(MyZoom)
    End If
End Sub
```

----------


## ColinE66

This is what makes this forum so great. Experts jumping in to solve head-scratching conundrums like this one.

----------

