LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default maximizing the size of a UserForm

I have seen code that basically fits to screen, but I do not believe it would
apply to the UserForm. Maybe somebody smarter than me knows how to write a
function that would do that by getting the screen size and setting it to a
variable that could be used like maximize. That is about the only solution I
can think of right now. I am no good at functions or I would try it for you.

"Takashi Yamauchi" wrote:

Thank you.

But I guess, this doesn't work, because, in your code, you have to know and
specify the width and height of UserForm1 beforehand. But I want to maximize
UserForm1 as you run the program and irrespective of the size of the display
monitor you are using (e.g., desktop, laptop, etc.). So, for example, you
wrote an Excel VBA, and give it to your friend. He opens the program. When
he opens it, the UserForm1 should be maximized no matter what display
monitor he has. But unfortunately, the code you gave me doesn't do that, I
guess. So, I guess, what is needed is a procedure that measures the
dimensions of the monitor, and feeds the information to UserForm1???

e.g.,
Userform1.width = DisplayMonitor.width
Userform1.height = DisplayMonitor.height
Userform1.left = 0
Userform1.top =0...

something like that...

But thank you anayway.


takashi yamauchi

"JLGWhiz" wrote in message
...
I just created a UserForm for a test. I put the width and height
dimensions
in the initialize event like this:

Private Sub UserForm_Initialize()
With UserForm1
.Width = 640
.Height = 480
End With
End Sub

Then in the VBA module I use:

Sub UFtst()
UserForm1.Show(Modal)
MsgBox "Check Size"
Unload UserForm1
End Sub

It brings the form up in the larger dimension, which indicates that you
can
set it to
fit your full screen size.

"Takashi Yamauchi" wrote:

Could anyone give me a suggestion?

As I open a UserForm, I want to maximize the size of the form (making it
as
large as my monitor). In the VB6 Form property, there is a property
called
"WindowState" and I can select "Maximized." But, I can't find a similar
property in Excel VBA. How can I automatically maximize a UserForm in
Excel
VBA?

Thank you

Takashi Yamauchi








 
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
Userform to size to display Jason V[_2_] Excel Programming 2 August 17th 07 02:06 AM
UserForm Size On Different Computers Minitman[_5_] Excel Programming 11 December 7th 06 04:22 PM
Print UserForm A4 size SZ Excel Programming 1 January 26th 05 10:03 AM
Print UserForm A4 size SZ Excel Programming 0 January 24th 05 07:07 AM
Userform Size Richard Excel Programming 1 May 27th 04 12:16 PM


All times are GMT +1. The time now is 11:51 AM.

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"