Bug OWC11 : ClearContents randomly takes just one second!

  • Thread starter Patrice Dargenton
  • Start date
P

Patrice Dargenton

Hello, I found a vey strange bug with OWC11 : ClearContents randomly takes
just one second! (sometimes it is normally fast, and sometimes the bug
occurs)

It occurs whether with range or with cells :
..ActiveSheet.Range(sRange).ClearContents()
..ActiveSheet.Cells(x, y).ClearContents()

This bug concern only OWC11, not OWC10 nor OWC9.
Does anyone have an idea?

Note : everything is optimized :
..ScreenUpdating = False
..EnableUndo = False
..EnableEvents = False
..Calculation = XlCalculation.xlCalculationManual

Thanks.
-------------------------------------------------------
Patrice Dargenton
(e-mail address removed)
http://patrice.dargenton.free.fr/index.html
-------------------------------------------------------

Configuration :
Microsoft Visual Studio 2008
Version 9.0.30729.1 SP
Microsoft .NET Framework
Version 3.5 SP1

Édition installée : VB Express

Microsoft Visual Basic 2008 91908-152-0000043-60706
KB945282
KB946040
KB946308
KB946344
KB947540
KB947789
KB948127
KB951708

OWC version : [11.0.0.8166]
Framework .Net version : [2.0.50727.3082]
 
P

Patrice Dargenton

I found a workaround :
..ActiveSheet.Range(sPlage).Cells.Value = ""
instead of :
..ActiveSheet.Range(sPlage).ClearContents() ' Bug : 1 sec. waiting for
something ?
 
P

Patrice Dargenton

There is another similar bug, with another solution : writing at least 2
lines (the bug occurs only with 1 line) :
..ActiveSheet.Range(sRange).ParseText(sbValues.ToString, vbTab)
 
Top