Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default 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
|
|


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
|
|

Reply
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
Entering date as MM/DD/YY no longer works, why? LostBrain Excel Discussion (Misc queries) 1 September 2nd 09 11:35 PM
ALT+ENTER no longer works Dale Excel Discussion (Misc queries) 2 March 6th 07 03:39 AM
New Computer HPVAL no longer works macgron Excel Worksheet Functions 3 February 12th 07 05:52 PM
Macro no longer works in XP C.B.[_2_] Excel Programming 1 December 14th 03 10:19 PM
Macro no longer works now that in Excel XP C.B.[_2_] Excel Programming 0 December 14th 03 09:49 PM


All times are GMT +1. The time now is 05:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"