Thread: Range problem
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jac Tremblay[_4_] Jac Tremblay[_4_] is offline
external usenet poster
 
Posts: 99
Default Range problem

Hi, I have this code that should work:
' ***
With rngSuppr
.Range(.Cells(intIndex + 1, 1), _
.Cells(intIndex + 1, intNbCol)).Value = ""
End With
' ***
....but it doesn's work. I just want to erase the contents of the cells in
the specified range.
I patched the problem like this but I do not like that solution.
' ***
Dim intK As Integer
With rngSuppr
For intK = 1 To intNbCol
.Cells(intIndex + 1, intK).Value = ""
Next intK
End With
' ***
Can someone tell me what the right syntax is?

Thanks.
--
Jac Tremblay