+ Reply to Thread
Results 1 to 3 of 3

VBA Find'Find next using variable, not hard coded

  1. #1
    Registered User
    Join Date
    10-08-2017
    Location
    Australia
    MS-Off Ver
    V 10
    Posts
    1

    VBA Find'Find next using variable, not hard coded

    Hello
    My name is Peter Taylor
    I am just wondering how the user can enter a name in a cell and find that name (if it exists) and the next occurrence of the cells value. I can use an InputBox, and that assigned value loops with the aid of a message box, but not a variable and highlight the selected cell. Is there anyone who can assist me with this dilemma please. Thanks in advance. The code below is where I'm at.

    Please Login or Register  to view this content.
    Last edited by alansidman; 10-09-2017 at 07:39 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,888

    Re: VBA Find'Find next using variable, not hard coded

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: VBA Find'Find next using variable, not hard coded

    Hi,

    You can replace the inputbox with a cell quite simply
    Please Login or Register  to view this content.
    To replace the Msgbox line, do you want to select all the cells or each one in turn? If the latter, do you need a delay of some sort?
    Don
    Please remember to mark your thread 'Solved' when appropriate.

+ 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. VBA Find'Find next using variable, not hard coded
    By Go Cats in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 10-08-2017, 07:33 PM
  2. hard-coded vs ?
    By daulpuchich in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-02-2015, 10:19 AM
  3. Replace hard coded date with variable.
    By Steve2107 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-27-2015, 08:58 PM
  4. [SOLVED] IF Formula ( Hard-Coded )
    By DespoExcel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-31-2014, 04:37 PM
  5. [SOLVED] Is it possible to replace this hard coded file name with a constant or variable?
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-11-2013, 11:21 PM
  6. Excel 2007 : Use a variable instead of a hard coded value
    By ThomasHaller in forum Excel General
    Replies: 2
    Last Post: 12-15-2011, 01:45 PM
  7. hard coded text
    By William Benson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-06-2005, 02:05 PM

Tags for this Thread

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