Private Sub ToggleButton1_Click()
If ToggleButton1.Value = True Then
' Visualizzazione userform a tutto schermo
'dimensioni iniziali
CuH = Scheda.Height
CuW = Scheda.Width
'Resize Form
Scheda.Top = Application.Top
Scheda.Left = Application.Left
Scheda.Width = Application.Width
Scheda.Height = Application.Height
'Resize contenuto
ZoW = Scheda.Width / CuW
ZoH = Scheda.Height / CuH
'calcola zoom
If ZoW < ZoH Then RZoom = ZoW Else RZoom = ZoH
Scheda.Zoom = RZoom * 100
Else
MsgBox "Tornare alle misure iniziali Altezza 500 - Larghezza 400"
End If
End Sub |