AronGahagan / cpt-dev

Code repository for the ClearPlan Toolbar
https://www.ClearPlanConsulting.com
3 stars 1 forks source link

cptStatus - ClearContents not working with certain combination of selections #400

Closed AronGahagan closed 4 months ago

AronGahagan commented 4 months ago

Problem:

User reports "Application-defined or object-defined error".

Status/cptStatusSheet_bas.bas:2036:  If Not oClearRange Is Nothing Then oClearRange.ClearContents
Status/cptStatusSheet_bas.bas:2221:  oWorksheet.Rows(lngRow + lngItem).ClearContents
Status/cptStatusSheet_bas.bas:2224:  oWorksheet.Rows(lngRow + lngItem).ClearContents

Solution:

TBD - testing needed. No discernible reason why this should be happening. We unlocked cells manually and then code proceeded normally. Happened on Row 16 -- perhaps it's the first time that SLOC was run on the newly generated sheet?

Todo:

AronGahagan commented 4 months ago

There must have been a change in MSFT products, because this error had never tripped before. The code has been in there for a long time. I changed oRange.ClearContents to oRange.Value = "" to bypass. Merged into next-release.