Thread: Nested With
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 Nested With

Hi,
Is it possible to nest With... End With statements?
Here is an example:
With ActiveWorkbook.Sheets("Param")
' ...
Set rng1stCol = .Range(.Range(strRange).Offset(2, 0), _
.Range(strRange).Offset(2, 0).End(xlDown))
For Each rngCell In rng1stCol
With Me.lstTest
.AddItem rngCell.Value
.List(.ListCount - 1, 1) = _
Format(rngCell.Offset(0, 1).Value, "yyyy-mm-dd")
End With
Next rngCell
Set rng1stCol = Nothing
End With
I just need some confirmation.
Thanks.
--
Jac Tremblay