+ Reply to Thread
Results 1 to 3 of 3

Combine two codes to make one!

  1. #1
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Combine two codes to make one!

    Hello All,

    I have a search code courtesy of (Bakerman2) below (code) that finds the name of an employee in a ListBox on a Worksheet. The code works great so no problem there.

    I had a previous code that when the user enters the employees name it would ask "Is ______ the name you were searching for?

    Is there a way to combine both to attain that in this code?

    1. Find the name searched for
    2. Ask if the name that it has found is the name being looked for... because it may find more then one John Smith in the list.

    I added this line to the code but does not do the job - Answer = MsgBox("Is " & "*.*" & " the employee you are searching", vbYesNoCancel, "VALIDATE RESULT")


    Please Login or Register  to view this content.


    Any thoughts?

    Regards,

    John
    Last edited by JJFletcher; 03-10-2021 at 07:31 AM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Combine two codes to make one!

    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 03-10-2021 at 01:01 AM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Combine two codes to make one!

    Hello AlphaFrog,

    Outstanding - This works perfect !!

    Regards,

    John

+ 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. [SOLVED] combine 2 codes together
    By anilpatni1234 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-24-2019, 12:00 PM
  2. Combine four codes with one code to make work faster
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2017, 11:40 AM
  3. How do I combine these 2 codes?
    By X myth in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-30-2017, 01:07 AM
  4. Combine two codes
    By KT99 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-02-2014, 10:23 AM
  5. How do i combine two codes to run together
    By Sam2149 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-25-2014, 05:42 PM
  6. Combine 2 codes
    By Minhaz.iubat in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-06-2014, 05:46 AM
  7. [SOLVED] How to combine these two set's of codes?
    By aadeshgandhi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-22-2013, 07:26 PM

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