Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Screen Width & Height
How can I increase the size of the form to the screen size.
I used the following but this produced an error. Variable Not defined Sub Userform Initialize() with Userform1 .Width=Screen.Width .Height=Screen.Height End With End Sub How can I increase the size of the userform to the screen size as this form will be used on multiple screens of different sizes. Regards Lee |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Screen Width & Height
Solved it by writing a few functions
Public Declare Function GetSystemMetrics Lib "User32" _ (ByVal nlndex As Long) As Long Public Const SM_CXSCREEN = 0 Public Const SM_CYSCREEN = 1 Public Function ScreenHeight() As Long ScreenHeight = GetSystemMetrics(SM_CYSCREEN) End Function Public Function ScreenWidth() As Long ScreenWidth = GetSystemMetrics(SM_CXSCREEN) End Function Thanks anyway to anyone who tried to assist "leerem" wrote: How can I increase the size of the form to the screen size. I used the following but this produced an error. Variable Not defined Sub Userform Initialize() with Userform1 .Width=Screen.Width .Height=Screen.Height End With End Sub How can I increase the size of the userform to the screen size as this form will be used on multiple screens of different sizes. Regards Lee |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Row height/column width | Excel Discussion (Misc queries) | |||
Screen. Width Screen.height | Excel Discussion (Misc queries) | |||
cell width and height | New Users to Excel | |||
Column Width and Row Height | Excel Worksheet Functions | |||
Height/Width measurements | Excel Worksheet Functions |