Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default auto-size userforms

Hi,

Is there a way in which I can auto-size a userform to fit the whole
screen , dependent on moniter size.

regards

John

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default auto-size userforms

This should maximize de Userform's dimension within Excel Window:

Private Sub UserForm_Initialize()
Me.Height = Application.Height
Me.Width = Application.Width
End Sub

HTH,

--
AP

a écrit dans le message de
ups.com...
Hi,

Is there a way in which I can auto-size a userform to fit the whole
screen , dependent on moniter size.

regards

John



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default auto-size userforms

Hi John,

Try:

'=============
Private Sub UserForm_Initialize()
Application.WindowState = xlMaximized
With Application
Me.Top = .Top
Me.Left = .Left
Me.Height = .Height
Me.Width = .Width
End With
End Sub
'<<=============


---
Regards,
Norman



wrote in message
ups.com...
Hi,

Is there a way in which I can auto-size a userform to fit the whole
screen , dependent on moniter size.

regards

John



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default auto-size userforms

Thanks

This works great, however on one of my forms I have a listbox, I have
added the code to this form, but it makes the form to big, any ideas

John

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default auto-size userforms

Forget the last post I have sorted it now, thanks guys great advice

John



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
Auto size a pivot table to a page size *.* Excel Worksheet Functions 1 August 23rd 06 05:09 AM
Auto size help sacrum Excel Discussion (Misc queries) 4 January 24th 06 08:33 AM
Auto size help sacrum Excel Programming 4 January 24th 06 08:33 AM
GetSystemMetrics32() [Screen Size and UserForms - pt 2] Jason Gatsby Excel Programming 0 August 4th 03 06:54 PM
Screen Size and UserForms Jason Gatsby Excel Programming 2 August 4th 03 01:48 PM


All times are GMT +1. The time now is 03:38 PM.

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

About Us

"It's about Microsoft Excel"