Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Excel 97 clearcontents method fails

I have a spreadsheet written in 2003 with the following code

destcell.clearcontents

Where destcell is a valid range (consisting of a single cell).

This fails when running under excel 97.

I've tried

destcell.clear

but this fails as well.

Anybody recognise this behaviour?

Anybody know where I can find useful resources on what has changed?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Excel 97 clearcontents method fails

Is the destcell a locked cell on a protected worksheet?

Is the destcell part of a merged cell?
destcell.value = ""
may work in any version



Peter wrote:

I have a spreadsheet written in 2003 with the following code

destcell.clearcontents

Where destcell is a valid range (consisting of a single cell).

This fails when running under excel 97.

I've tried

destcell.clear

but this fails as well.

Anybody recognise this behaviour?

Anybody know where I can find useful resources on what has changed?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Excel 97 clearcontents method fails

Clearcontents works very well in xl97, so I think you have to look for
another cause.

If you are running this from a commandbutton, possibly you are running into
the focus issue associated with xl97 and activex controls from the control
toolbox toolbar. In that case, try changin the takefocusonclick property of
the commandbutton to false.

--
Regards,
Tom Ogilvy


"Peter" wrote:

I have a spreadsheet written in 2003 with the following code

destcell.clearcontents

Where destcell is a valid range (consisting of a single cell).

This fails when running under excel 97.

I've tried

destcell.clear

but this fails as well.

Anybody recognise this behaviour?

Anybody know where I can find useful resources on what has changed?


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
Method 'SaveAs' fails mtpsuresh[_3_] Excel Programming 1 August 16th 06 11:21 AM
Activate method of Worksheet class fails in Excel 2000 Chris Bloom Excel Discussion (Misc queries) 3 September 10th 05 12:05 AM
ClearContents method on a passed range bryan New Users to Excel 2 January 19th 05 08:49 AM
Excel 2002 SP2 VBA 6.3 'RefersTo' Method fails Robert L. Porter Excel Programming 2 June 4th 04 02:31 PM
Open method of workbooks fails when Excel is hosted in IE [email protected] Excel Programming 5 January 30th 04 02:19 AM


All times are GMT +1. The time now is 01:24 PM.

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"