View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
darxoul darxoul is offline
external usenet poster
 
Posts: 8
Default Application-defined or object-defined error (worksheet, range, sel

hi everybody,

sorry for the messy code, but i have the famous "Application-defined or
object-defined error" problem with the 2nd line
(Worksheets("DIFF").Columns(CommonColInd, NegCol).Select)

NegCol = CommonColInd + 1
Worksheets("DIFF").Columns(CommonColInd, NegCol).Select
Selection.ClearContents
Selection.Interior.ColorIndex = xlNone

Here CommonColInd is incremented in a loop and the value is 25 when I have
the error. (The thing that I am looking for is in the 25th column, when I
find it I want to clear the contents of those two columns. I have more than
one worksheets)

Any ideas, comments?

Thanks in advance