![]() |
ActiveWindow.Width no longer works for me!
I'd appreciate any pointers to help solve a problem.
Since upgrading to Office 2003 and when using an Excel application (Excel version 11.5612.5703) I get an error Runtime error '1004' Unable to set the Width property of the Window class. The help does not hint (to me) at what might be the cause. There are several places where I use this similar approach ======================== code snippet Worksheets("StartForm").Activate With ActiveWindow .Width = 420 .Height = 260 End With etc. ======================= -- Rickety |
ActiveWindow.Width no longer works for me!
If the window is maximized this error will occur. Try making sure the
window is in the restored state: With ActiveWindow .WindowState = xlNormal .Width = 420 .Height = 260 End With -- Jim Rech Excel MVP "rickety" wrote in message ... | I'd appreciate any pointers to help solve a problem. | | Since upgrading to Office 2003 and when using an Excel application (Excel | version 11.5612.5703) I get an error | | Runtime error '1004' Unable to set the Width property of the Window class. | | The help does not hint (to me) at what might be the cause. | | There are several places where I use this similar approach | | ======================== | code snippet | | Worksheets("StartForm").Activate | | | With ActiveWindow | .Width = 420 | .Height = 260 | End With | | | etc. | ======================= | | -- | Rickety | | |
ActiveWindow.Width no longer works for me!
Thanks Jim
I saw that info in the help file, but as the Excel window was normal, I totally missed the fact that the worksheet window within Excel was maximised. I made the change, fully expecting the problem to remain - but it went. That's how the subtlety between the Excel window and the worksheet window became clear. Ah well, I guess I should trust the Help files more and try out what they say, even if it doesn't seem relevant! Thanks again! "Jim Rech" wrote in message ... If the window is maximized this error will occur. Try making sure the window is in the restored state: With ActiveWindow .WindowState = xlNormal .Width = 420 .Height = 260 End With -- Jim Rech Excel MVP "rickety" wrote in message ... | I'd appreciate any pointers to help solve a problem. | | Since upgrading to Office 2003 and when using an Excel application (Excel | version 11.5612.5703) I get an error | | Runtime error '1004' Unable to set the Width property of the Window class. | | The help does not hint (to me) at what might be the cause. | | There are several places where I use this similar approach | | ======================== | code snippet | | Worksheets("StartForm").Activate | | | With ActiveWindow | .Width = 420 | .Height = 260 | End With | | | etc. | ======================= | | -- | Rickety | | |
All times are GMT +1. The time now is 06:58 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com