Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default autofilter next and previous record problem

Hi experts,

I have a problem after using autofilter.
After useing autofilter i use the following code for going to the next or
previous records

next:
Private Sub but_next_Click()
Do
Set filterrange = filterrange.Offset(1, 0)
Loop While filterrange.EntireRow.Hidden = True
Call textboxen_vullen 'code to fill a lot of textboxes
End Sub

previous
Private Sub but_next_Click()
Do
Set filterrange = filterrange.Offset(-1, 0)
Loop While filterrange.EntireRow.Hidden = True
Call textboxen_vullen 'code to fill a lot of textboxes
End Sub

The problem is that there is no limit.
If i click previous enough times, i get an error message.
I would like it to stop at the first record of the filtered set

Also if i click the "next"button i want it to stop at the last record of the
filtered list

Can you please help me with this ?
Thanks,
Pierre





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open new record with selected fields from previous record Design by Sue Excel Discussion (Misc queries) 1 June 12th 09 02:24 PM
Continuing problem populating userform from a previous record Dooley007 Excel Programming 7 December 20th 06 03:19 PM
How to display set of record s on the forms using previous & next button jophy j via OfficeKB.com Excel Programming 0 July 21st 05 07:02 AM
Autofilter record count Debbie Thompson Excel Discussion (Misc queries) 1 February 11th 05 05:32 PM
Need help autopopulating next new record with previous record data Harry S[_3_] Excel Programming 2 October 1st 03 10:59 PM


All times are GMT +1. The time now is 03:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"