+ Reply to Thread
Results 1 to 4 of 4

Stopping a spinner when it's reached end of results

  1. #1
    Registered User
    Join Date
    05-03-2006
    Posts
    37

    Stopping a spinner when it's reached end of results

    Hi everyone,

    I post this here because I suspect it requires vb. Here's the scenario...

    I've created a "search" sheet where users can search (using advanced filtering in the background) for the details (address, skills, rates etc) of about 500 individual people from another "data" sheet (one row per person = 500 rows of data). They do it by typing part or all of a person's name into a cell which is linked to the "advanced filter" sheet. The results of the advanced filter are posted to another "filter results" sheet. After they enter the search criteria and press the search button, a macro then takes them to a "results" sheet which uses vlookups to present all of the details of each row in the "filter results" sheet one individual (or row) at a time. They can scroll through each individual (or row) by using a spinner.

    I have a countif formula on the "results" sheet which makes a note of the number of rows generated by the advanced filter in the "filter results" sheet.

    Unfortunately when (using the spinner) they reach the end of the results (i.e. the vlookups in the "results" sheet start returning blank rows in the "filter results" sheet) they can continue scrolling upwards with the spinner which continues to display 0's in the vlookup fields.

    The only thing my limited brain and experience has been able to come with is a basic "if" function which compares the current value of the spinner to the countif formula and displays text "No more results, please start a new search" in a prominent position on the "results" sheet.

    Is there a way I can stop user continuing to be able to scroll upwards with the spinner when the current value of the spinner is greater than the count of the rows containing data in the "filter results" sheet?

    Hope this makes sense.

    Kind regards

    Henry

  2. #2
    Registered User
    Join Date
    05-03-2006
    Posts
    37
    I've figured it out. I reset the max value of the spinner to match the value in the countif cell (cell O5) and then select a cell on the sheet to deselect the spinner...
    Please Login or Register  to view this content.
    Warm regards

    Henry
    Last edited by VBA Noob; 06-16-2007 at 01:16 PM.

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    happyfingers,

    Please read forum rules below. Code must always be wrapped.

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  4. #4
    Registered User
    Join Date
    05-03-2006
    Posts
    37
    Apologies - duly noted for when I post code going forward.
    Cheers
    H

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1