Making VBA userforms full screen???


Posted by Niall Clifford on December 19, 2001 3:47 PM

Does anyone know how to make an excel-vba userform go into full screen mode, ie. taking out the caption bar and windows task bar??

If so could ya please e-mail me at niall_clifford@iol.ie

Thanks for your time :-)

NiallC

Posted by Lewis (1) on December 19, 2001 4:08 PM

Hi

Application.DisplayFullScreen = True
to make it full screen
Application.DisplayFullScreen = False
to return to the normal view

This I discovered by recording a macro!

Lewis

Posted by Calchas on December 19, 2001 4:59 PM

But how to do for UserForms ?

Posted by Colo on December 19, 2001 10:30 PM

Re: But how to do for UserForms ?

Hi Try this.

'/please paste to UserForm1.Module
Private Sub UserForm_Initialize()
Call MyZoom
End Sub

'/please paste to Module
Declare Function GetSystemMetrics Lib "user32" _
(ByVal nIndex As Long) As Long

Sub MyZoom()
Dim x As Long, y As Long
x = GetSystemMetrics(0)
y = GetSystemMetrics(1)
With UserForm1
If .Zoom = 100 Then
.Zoom = (x / 498) / (4 / 3) * 100
.Width = x / (4 / 3)
.Height = y / (4 / 3)
Else
.Zoom = 100
.Width = 498
.Height = 378.75
End If
.StartUpPosition = 3
.Repaint
End With
End Sub



Posted by Calchas on December 20, 2001 12:12 AM

Thanks.

Try this.