Size Matters!

A

Andy

H
Can anyone tell me if it is possible to the following
I have a excel document that will be sent to our contact to fill in and return. Is it possible to make the form change size depending on the resoloution of the screen it is being viewed on???
 
R

Ron de Bruin

Try this

Declare Function GetSystemMetrics32 Lib "user32" Alias "GetSystemMetrics" (ByVal nIndex As Long) As Long
Function DisplayVideoResolution() As String
DisplayVideoResolution = GetSystemMetrics32(0) & " x " & GetSystemMetrics32(1)
End Function

Sub test()
If DisplayVideoResolution = "1024 x 768" Then Zoom = 100
If DisplayVideoResolution = "800 x 600" Then Zoom = 80
If DisplayVideoResolution = "640 x 480" Then Zoom = 50
' add other resolutions
ActiveWindow.Zoom = Zoom
End Sub

You can loop through your sheets and change the zoom when you open the workbook(open event)



--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)




Andy said:
Hi
Can anyone tell me if it is possible to the following.
I have a excel document that will be sent to our contact to fill in and return. Is it possible to make the form change size
depending on the resoloution of the screen it is being viewed on???
 
Top