LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Counter for records found during Find

Here's what I have:
The user wants to find a record. He clicks a button to request this,
and enters a PO number. A sub in a standard module is executed that
performs a Find. Then another UserForm comes up showing the record. One
of the textboxes of this UserForm will show the total number of records
found under this PO number. Here's the coding for this:

This code is in UserForm13
'Counter for how many of this PO/PL there are on the list
'This goes in TextBox15
CountPO = Application.CountIf(Range("J:J"), FindPOVal)
TextBox15.Value = CountPO

FindPOVal is a declaration in the standard module, and is a variable in
the Find command.
Public FindPOVal As String

There are Next and Previous buttons on this UserForm, that will allow
the user to view each of the found records, backward, and forward.

Here's what I need:
What I want to add to this UserForm is a textbox that will show which
record of those found that is being viewed at that time.
I already have the total count. I need to attach a number for each
found record.

Example: 4 records are found. The 1st records comes up, and the number
in TextBox15 is 4. The number in this new textbox I want to add will
be 1.
User clicks the Next button. Record 2 will appear, and the new text box
will show the number 2. User clicks Next again, and record 3 appears.
TextBox15 shows 3.
The user clicks the Previous button, and record 2 comes up again.
Textbox15 shows 2.

Any suggestions on how to add this counter for the new textbox?
Also, where would I put the code? In UserForm13? Or in the standard
module where the Find command is?

Thanks,
J.O.

 
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
How to get number of filtered records found displayed in a cell? Jessica New Forest Excel Worksheet Functions 4 March 25th 09 11:57 AM
In Excel, How do I get AutoFilter to provide# of records found? DougD Excel Discussion (Misc queries) 1 June 19th 08 07:51 PM
How to change left bottom note that tell number records found? Cpviv New Users to Excel 1 June 13th 08 04:46 PM
how do I display filtered records found Pat Excel Discussion (Misc queries) 1 December 29th 05 02:34 PM
Advanced Filter: Number of Records Found Charlie Rowe Excel Discussion (Misc queries) 2 November 3rd 05 09:09 PM


All times are GMT +1. The time now is 02:59 AM.

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"