ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Unexpected window positioning error (https://www.excelbanter.com/excel-programming/432492-unexpected-window-positioning-error.html)

K_Macd

Unexpected window positioning error
 
I recorded the following code in the macro recorder but when I run it all
methods fail giving a similar message

Sub HalfWindow()

Application.Left = 6
Application.Top = 3
Application.Width = 645
Application.Height = 780

End Sub

Run Time 1004 - Method 'Left' of object '_application' failed

Any clues ?

TIA
--
Ken
"Using Dbase dialects since 82"
"Started with Visicalc in the same year"

p45cal[_63_]

Unexpected window positioning error
 

It won't work on a maximised window, add
Application.WindowState = xlNormal
before the first of your 4 statements.

K_Macd;454912 Wrote:
I recorded the following code in the macro recorder but when I run it
all
methods fail giving a similar message

Sub HalfWindow()

Application.Left = 6
Application.Top = 3
Application.Width = 645
Application.Height = 780

End Sub

Run Time 1004 - Method 'Left' of object '_application' failed

Any clues ?

TIA
--
Ken
"Using Dbase dialects since 82"
"Started with Visicalc in the same year"



--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=125926



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

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