#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default userform

I have a userform which is necessarily large.
On some screens at work it is off the bottom of the screen.
Is there anyway to make the userform automatically fit to
the size of the screen, or failing that allowing it to be
manually adjusted by the user using sizing handles?

Many thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 214
Default userform

Hi Mandy,
To allow the user to modify the userform size:

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _
(ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

Private Sub UserForm_Initialize()
SetWindowLong FindWindow(vbNullString, Me.Caption), -16, &H84CC0080
End Sub

Regards,
MP

"Mandy" a écrit dans le message de
...
I have a userform which is necessarily large.
On some screens at work it is off the bottom of the screen.
Is there anyway to make the userform automatically fit to
the size of the screen, or failing that allowing it to be
manually adjusted by the user using sizing handles?

Many thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default userform

Mandy,

Almost all my userforms are too long
to fit on the screen either. I find that
resizing them to fit on the screen is
not very helpful because it makes
the print too small to read comfortably.

What I've done in all instances is
to utilize scroll bars. My users
have uniformly told me that they
prefer scrolling to squinting.

-- Dennis Eisen
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA userform jcheko Excel Worksheet Functions 1 April 24th 08 08:38 PM
userform carwincarber New Users to Excel 0 October 23rd 05 06:59 PM
Need help with userform....please.... marty6 Excel Programming 9 April 26th 04 09:45 PM
Userform inside another userform Ryan Excel Programming 0 April 23rd 04 08:01 PM
Userform Help Pete[_13_] Excel Programming 1 November 14th 03 10:03 PM


All times are GMT +1. The time now is 08:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"