ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Application Size and Location (https://www.excelbanter.com/excel-programming/280862-application-size-location.html)

Jeff Harbin[_2_]

Application Size and Location
 
Can someone get me started on the general code for changing the size and
location of the entire Excel application including a worksheet?

What I want to do is have the application window shrink down to the size of
a single enlarged cell in the active workbook where I will then update
messages as the program runs.




Tom Ogilvy

Application Size and Location
 
The application object has Top, left, height and width properties

Sub AAABB()
Application.Top = 20
Application.Left = 30
Application.Height = 150
Application.Width = 150
End Sub

as as an example. The application needs to be a window at the time

Sub AAABB()
Application.WindowState = xlNormal
Application.Top = 20
Application.Left = 30
Application.Height = 150
Application.Width = 150
End Sub

--
Regards,
Tom Ogilvy


Jeff Harbin wrote in message
link.net...
Can someone get me started on the general code for changing the size and
location of the entire Excel application including a worksheet?

What I want to do is have the application window shrink down to the size

of
a single enlarged cell in the active workbook where I will then update
messages as the program runs.






[email protected]

Application Size and Location
 

Sub SetAppWindowState()
'' Sets Excel to the left side of the screen.

With Application
.WindowState = xlNormal
.Left = 0
.Top = 0
.Width = 400
.Height = 630
End With

End Sub

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------

Can someone get me started on the general code for changing the size and
location of the entire Excel application including a worksheet?

What I want to do is have the application window shrink down to the size of
a single enlarged cell in the active workbook where I will then update
messages as the program runs.




Jeff Harbin[_2_]

Application Size and Location
 
Thanks guys. I was so close. I didn't change the WindowState to xlNormal.



"Tom Ogilvy" wrote in message
...
The application object has Top, left, height and width properties

Sub AAABB()
Application.Top = 20
Application.Left = 30
Application.Height = 150
Application.Width = 150
End Sub

as as an example. The application needs to be a window at the time

Sub AAABB()
Application.WindowState = xlNormal
Application.Top = 20
Application.Left = 30
Application.Height = 150
Application.Width = 150
End Sub

--
Regards,
Tom Ogilvy


Jeff Harbin wrote in message
link.net...
Can someone get me started on the general code for changing the size and
location of the entire Excel application including a worksheet?

What I want to do is have the application window shrink down to the size

of
a single enlarged cell in the active workbook where I will then update
messages as the program runs.









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

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