View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Number showing row location when you scroll

Cimjet presented the following explanation :
Hi everyone
I've got a Userform with a Spinbutton that allows me to scroll up and down
and view my list from the database.
Same thing used in XL2003 DataForm with the buttons Prev. and Next.
On that Userform, they have a counter that shows you at what row you're at.
just above the buttons something like this 3 of 950 and would like to
know how to do that.
I've tried different thing but no success. could someone give me some codes
or direct me in the right direction.
Regards
Cimjet


The counter in DataForm is actually taking the header row into account,
and so the row number is the record number+1. IOW, '3 of 950' is row4
of 951 rows of data because the header row is row1.

So.., if you have yur spinbutton working then you can dupe display of
the 'counter' in a label by matching the position of the spinbutton to
the current row-1, and set the total records to 'Rows.Count-1'.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc