Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Error Setting Excel's Application.Left Property

Win XP Pro, Excel 2002 SP3

We're seeing a growing problem with some folks using multiple monitors and
saving Excel workbooks that are in strange locations. In some cases,
single-monitor users are opening the workbooks and seeing nothing except the
grey background.

To avoid this, I wrote a bit of code to repostion the worksheets where they
could be seen - it works fine for me, but some other users are getting an
error message:

Runtime Error 1004
Method left of Object _Application Failed

Logged in as one of the other users and working in the Immediate Pane, I've
verified that they indeed cannot set the left or top property of Application
without getting this error. Any insights what's going on? Code follows:

Private Sub Workbook_Open()
'If the workbook was on the left screen when it was saved, move the left
edge of the Excel window to the left edge of the right
' (or only screen)
If Application.left < 0 Then Application.left = 0

'If the worksheet is farther to the left than the width of the Excel
window, move the worksheet to the left edge of the
' Excel Window
If Application.Width < ActiveWindow.left Then ActiveWindow.left = 0

End Sub


Thanks for any help!

James Cox


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
Error setting shape text property Sarge Charts and Charting in Excel 2 January 11th 06 03:31 AM
Runtime error 380: Could not set the List property. invalid property value of listbox jasgrand Excel Programming 0 October 6th 04 09:28 PM
Setting the formula property of a textbox dino Excel Programming 1 June 30th 04 11:03 AM
Setting TopMargin Property in VBA John S.[_3_] Excel Programming 2 October 17th 03 06:08 PM
setting formula property Ed Stevens Excel Programming 1 September 9th 03 04:59 AM


All times are GMT +1. The time now is 01:52 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"