Private frmWidth As Integer Private frmHeight As Integer
Private Sub Form_Resize() If Me.WindowState = vbMaximized Then Me.WindowState = vbNormal End If If Me.WindowState = vbNormal Then If Me.Width <> frmWidth Then Me.Height = Me.Width End If If Me.Height <> frmHeight Then Me.Width = Me.Height End If End If frmWidth = Me.Width frmHeight = Me.Height End Sub