+ 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
    12

    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, UK
    MS-Off Ver
    365
    Posts
    7,468

    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

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

    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, UK
    MS-Off Ver
    365
    Posts
    7,468

    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
    12

    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, UK
    MS-Off Ver
    365
    Posts
    7,468

    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
    12

    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)

Similar Threads

  1. Replies: 0
    Last Post: 07-16-2015, 07:51 AM
  2. Cannot find Forms folder
    By GCW esq in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-09-2013, 01:01 AM
  3. [SOLVED] New to Forms-How do I find a missing control?
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-06-2013, 09:25 PM
  4. Print on ready blank forms (document forms)
    By gandrinno in forum Excel General
    Replies: 1
    Last Post: 02-16-2009, 06:12 PM
  5. Find function for forms
    By heinousanus in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-28-2006, 02:46 PM
  6. [SOLVED] Excel forms - authorise / deny forms
    By Ian Manning in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-08-2006, 12:10 PM
  7. Replies: 1
    Last Post: 02-13-2006, 03:10 AM

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