Excel VBA Frame ControlEffect

Frame Lengthening And Shortening Effect With Buttons

The loops were used  purpose of lengthening / shortening frame ,stopping operation.

VBA codes of "Extend" button :
Private Sub CommandButton1_Click()
Dim i As Double
Cancel = False
i = Frame1.Height
        i = i + 0.015
        Frame1.Height = i
             If Cancel Then
                Exit Do
            End If
        Loop Until Frame1.Height >= 276
End Sub

No comments:

Post a Comment