LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Excel 97 - Clear Method Of Range Object Failed

Are you running this from a commandbutton on the worksheet?

If yes, there's a bug in xl97 (fixed in xl2k). Set the .takefocusonclick
property of that button to false.

If you're running this from a control from the controltoolbox toolbar that
doesn't have that property, just add a line like this at the top of your code:

activecell.activate



Ron Bishop wrote:

I have an application that was developed in Excel 2000 and
works fine on all users pcs that are running Excel 2000.
On one user who is still using Excel 97, the application
fails on a line of code that reads "sheet2.cells.clear"
with the message "Clear method of range object failed."

The strange thing is that the same procedure executes the
same code for sheet1 at an earilier point in the procedure
and does not produce the error.

Thanks


--

Dave Peterson

 
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
Method Add of object Validation Failed - please help Shokie New Users to Excel 1 July 10th 09 01:34 PM
Method 'Range' of object '_global' failed higherlimits Excel Discussion (Misc queries) 3 June 23rd 06 06:16 PM
runtime error 1004 method range of object '_global failed valdesd Excel Discussion (Misc queries) 2 October 6th 05 07:26 PM
Method ~ of Object ~ Failed. Joan Excel Programming 5 August 26th 03 08:13 PM
Method 'Range' of object '_Global' failed Mohanasundaram[_2_] Excel Programming 1 August 25th 03 01:43 PM


All times are GMT +1. The time now is 12:29 PM.

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

About Us

"It's about Microsoft Excel"