+ Reply to Thread
Results 1 to 7 of 7

Find Next and Emaling forms

  1. #1
    Registered User
    Join Date
    02-22-2019
    Location
    Calgary, AB
    MS-Off Ver
    2007
    Posts
    10

    Find Next and Emaling forms

    Hi Guys,

    A couple issues;

    1. I'm having trouble programming a next/previous button to scroll trough the found names. The code will find a name and populate the form like I want, but only with the first result. I need to be able to hit the "next" button and go to the next entry in case some of the first names are the same.

    2. Everything breaks when I email the excel document. The user form doesn't show, and the select date (calendar button) i made just shows as a big red X.

    I've attached the form and the code is below. Help?

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex
    MS-Off Ver
    2010 & 2016
    Posts
    4,830

    Re: Find Next and Emaling forms

    Q1. Below is code for the click events of your previous and next buttons. In the attached I've also made a few other changes to your code.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Q2. I'd take a guess the form is not showing because the user at the other end has not enabled macros when the warning pops up. If they don't see a warning then there is potentially something wrong with their Excel install.
    As for the calendar not showing, that will all depend on which version of Excel they're using and whether or not they have the same calendar as you installed on their machine. Why not just let them enter a date manually rather than use the date picker? You can use validation to force the users to enter actual dates if that's what you're worried about.

    BSB
    Attached Files Attached Files
    Please show appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  3. #3
    Registered User
    Join Date
    02-22-2019
    Location
    Calgary, AB
    MS-Off Ver
    2007
    Posts
    10

    Re: Find Next and Emaling forms

    HI!

    Thanks!

    I`m getting the error:
    compile error: ambiguous name detected: prev_click

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex
    MS-Off Ver
    2010 & 2016
    Posts
    4,830

    Re: Find Next and Emaling forms

    That'll be because you've pasted my code in along with your Prev_Click sub rather than deleting yours and replacing it with mine.

    You can only have one sub with that name at a time.

    BSB

  5. #5
    Registered User
    Join Date
    02-22-2019
    Location
    Calgary, AB
    MS-Off Ver
    2007
    Posts
    10

    Re: Find Next and Emaling forms

    Ok, I've fixed that, and now I'm getting Complie Error: Sub or Function not defined.

    It's highlighting Call Populateform under Next_click

    Sorry thanks for your help I'm really new at this.

  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex
    MS-Off Ver
    2010 & 2016
    Posts
    4,830

    Re: Find Next and Emaling forms

    In the version of your file I attached there is another sub that you appear to be missing from whatever file you're using.
    You need to add the below code to your file:
    Please Login or Register  to view this content.
    BSB

  7. #7
    Registered User
    Join Date
    02-22-2019
    Location
    Calgary, AB
    MS-Off Ver
    2007
    Posts
    10

    Re: Find Next and Emaling forms

    Hi!

    Thanks again for your help;

    Runtime Error 1004
    Application or object defined error.

    It then highlights the me.lastname = .cells(recallrow,3)

+ 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