ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Auto-size the UserForm with Monitor Configuration (https://www.excelbanter.com/excel-programming/431101-auto-size-userform-monitor-configuration.html)

Eddie_SP[_2_]

Auto-size the UserForm with Monitor Configuration
 
Hi Community !

I have an UserForm that will fill the whole screen.
I don't want to show the sheet as "background". I have my company logo as
background with many CommandButtons on the UserForm.

The problem is that when I open the file in my laptop, due to the laptop
configuration, it gets smaller.

Question is:

Is there any command to "auto-size" this UserForm in anywhere I open this
file?

Another question:

Can someone give the command for Print View by using a commandbutton? I have
this:

Private Sub CommandButton6_Click()
ActiveWindow.SelectedSheets.PrintPreview
End Sub

But it bugs excel freezing all panes.

Thank you in advance !!!

Jim Cone[_2_]

Auto-size the UserForm with Monitor Configuration
 
"Is there any command to "auto-size" this UserForm in anywhere I open this file?"
'--
Private Sub UserForm_Initialize()
Me.Height = Application.Height
Me.Width = Application.Width
End Sub
'--
You also may ? want to set the Application.WindowState to
xlMaximized or xlNormal
--
Jim Cone
Portland, Oregon USA




"Eddie_SP"

wrote in message
Hi Community !

I have an UserForm that will fill the whole screen.
I don't want to show the sheet as "background". I have my company logo as
background with many CommandButtons on the UserForm.
The problem is that when I open the file in my laptop, due to the laptop
configuration, it gets smaller.
Question is:
Is there any command to "auto-size" this UserForm in anywhere I open this
file?
Another question:
Can someone give the command for Print View by using a commandbutton?
I have this:

Private Sub CommandButton6_Click()
ActiveWindow.SelectedSheets.PrintPreview
End Sub

But it bugs excel freezing all panes.
Thank you in advance !!!

Eddie_SP[_2_]

Auto-size the UserForm with Monitor Configuration
 
Jim, great job !!!

Thank you very much !!!

Eddie - Sao Paulo - Brazil


"Jim Cone" wrote:

"Is there any command to "auto-size" this UserForm in anywhere I open this file?"
'--
Private Sub UserForm_Initialize()
Me.Height = Application.Height
Me.Width = Application.Width
End Sub
'--
You also may ? want to set the Application.WindowState to
xlMaximized or xlNormal
--
Jim Cone
Portland, Oregon USA




"Eddie_SP"

wrote in message
Hi Community !

I have an UserForm that will fill the whole screen.
I don't want to show the sheet as "background". I have my company logo as
background with many CommandButtons on the UserForm.
The problem is that when I open the file in my laptop, due to the laptop
configuration, it gets smaller.
Question is:
Is there any command to "auto-size" this UserForm in anywhere I open this
file?
Another question:
Can someone give the command for Print View by using a commandbutton?
I have this:

Private Sub CommandButton6_Click()
ActiveWindow.SelectedSheets.PrintPreview
End Sub

But it bugs excel freezing all panes.
Thank you in advance !!!


Jim Cone[_2_]

Auto-size the UserForm with Monitor Configuration
 
You are welcome.
--
Jim Cone
Portland, Oregon USA



"Eddie_SP"
wrote in message
Jim, great job !!!
Thank you very much !!!
Eddie - Sao Paulo - Brazil




"Jim Cone" wrote:
"Is there any command to "auto-size" this UserForm in anywhere I open this file?"
'--
Private Sub UserForm_Initialize()
Me.Height = Application.Height
Me.Width = Application.Width
End Sub
'--
You also may ? want to set the Application.WindowState to
xlMaximized or xlNormal
--
Jim Cone
Portland, Oregon USA






"Eddie_SP"

wrote in message
Hi Community !

I have an UserForm that will fill the whole screen.
I don't want to show the sheet as "background". I have my company logo as
background with many CommandButtons on the UserForm.
The problem is that when I open the file in my laptop, due to the laptop
configuration, it gets smaller.
Question is:
Is there any command to "auto-size" this UserForm in anywhere I open this
file?
Another question:
Can someone give the command for Print View by using a commandbutton?
I have this:

Private Sub CommandButton6_Click()
ActiveWindow.SelectedSheets.PrintPreview
End Sub

But it bugs excel freezing all panes.
Thank you in advance !!!



All times are GMT +1. The time now is 09:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com