View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gert-Jan Gert-Jan is offline
external usenet poster
 
Posts: 49
Default Counting rows in a range

I need some help with the following: I have a (dynamic) range called
rangetest. I want to show some data in a userform, with buttons "next" and
"previous". But I don't now how to count the rows in my range (see the code
below).

Any help would be appriciated!!

i = rangetest + 1
vrijwap.Caption = Cells(i, 5).Value
vrijwuw.Caption = Cells(i, 6).Value
vrijwwj.Caption = Cells(i, 7).Value
profap.Caption = Cells(i, 8).Value
profuw.Caption = Cells(i, 9).Value
profwj.Caption = Cells(i, 10).Value
next.Enabled = i < swapalles.Rows.Count / ListCount - wrong!!
previous.Enabled = i 1