+ Reply to Thread
Results 1 to 25 of 25

Find Text and input in MSGBOX

  1. #1
    Forum Contributor
    Join Date
    05-26-2016
    Location
    India
    MS-Off Ver
    Microsoft 2021
    Posts
    324

    Angry Find Text and input in MSGBOX

    Hello
    I hope all of you are doing well , My attached file is working fine but I want to modification in it ....

    Find the word " EXPECTED" and Note/copy the Row number and paste it into MSGBOX and click OK

    My Current code is as below

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

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Find Text and input in MSGBOX

    your code does not need to be that long. the methods .find and .findnext will do exactly what you want. I just finished a project for a gentleman in England that used those 2 methods heavily. they find anything, anywhere, if you spec the args correctly. see these:

    https://docs.microsoft.com/en-us/off...cel.range.find

    https://docs.microsoft.com/en-us/off...range.findnext

  3. #3
    Forum Contributor
    Join Date
    05-26-2016
    Location
    India
    MS-Off Ver
    Microsoft 2021
    Posts
    324

    Re: Find Text and input in MSGBOX

    Thank you VBA_PHP , i have already tried find fuction which is partly working actually I am stuck to pass(input) the value in MSGBOX of find result

  4. #4
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Find Text and input in MSGBOX

    Quote Originally Posted by vikas_newports View Post
    Thank you VBA_PHP , i have already tried find fuction which is partly working actually I am stuck to pass(input) the value in MSGBOX of find result
    post the code pls.

  5. #5
    Forum Contributor
    Join Date
    05-26-2016
    Location
    India
    MS-Off Ver
    Microsoft 2021
    Posts
    324

    Re: Find Text and input in MSGBOX

    Quote Originally Posted by vba_php View Post
    post the code pls.
    Please Login or Register  to view this content.
    Last edited by vikas_newports; 11-04-2020 at 03:52 PM.

  6. #6
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Find Text and input in MSGBOX

    does this code work for you? I just finished a job for someone that used this exactly same code and it worked fine. I do not like excel for this vary reason. can you test this and see if it turns red for you too? but regardless, the code should work fine cuz it's searching a def'd range, and it's returned to a range as well.
    Attached Images Attached Images

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,072

    Re: Find Text and input in MSGBOX

    That code can never work, you have got the = & : signs the wrong way round for LookIn

  8. #8
    Forum Contributor
    Join Date
    05-26-2016
    Location
    India
    MS-Off Ver
    Microsoft 2021
    Posts
    324

    Re: Find Text and input in MSGBOX

    vba_php
    above pic code is finding the keyword " 1" as I am already successfully in this step

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    05-26-2016
    Location
    India
    MS-Off Ver
    Microsoft 2021
    Posts
    324

    Re: Find Text and input in MSGBOX

    Quote Originally Posted by Fluff13 View Post
    That code can never work, you have got the = & : signs the wrong way round for LookIn
    can you review this

    Please Login or Register  to view this content.

  10. #10
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,072

    Re: Find Text and input in MSGBOX

    If you just want to know the address, try
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    05-26-2016
    Location
    India
    MS-Off Ver
    Microsoft 2021
    Posts
    324

    Re: Find Text and input in MSGBOX

    Fluff13, I want to use the activecell address in INPUT field of msgbox , i tried to this but giving error " Type Mismatch"
    rw = Application.InputBox("Enter the row number to start from.", "STARTING ROW NUMBER", s)

  12. #12
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,072

    Re: Find Text and input in MSGBOX

    How about
    Please Login or Register  to view this content.

  13. #13
    Forum Contributor
    Join Date
    05-26-2016
    Location
    India
    MS-Off Ver
    Microsoft 2021
    Posts
    324

    Re: Find Text and input in MSGBOX

    Quote Originally Posted by Fluff13 View Post
    How about
    Please Login or Register  to view this content.
    Yes it is working but it is asking for click on OK , how can we avoid it.

  14. #14
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,072

    Re: Find Text and input in MSGBOX

    Are you saying that you don't want the inputbox at all & to just use the row where expected was found?

  15. #15
    Forum Contributor
    Join Date
    05-26-2016
    Location
    India
    MS-Off Ver
    Microsoft 2021
    Posts
    324

    Re: Find Text and input in MSGBOX

    actually I am using input box to find my row number of my keyword , then I split the data after the above-inputted row number
    if you clear the content from result sheet and run this macro you will get the idea

  16. #16
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,072

    Re: Find Text and input in MSGBOX

    That won't tell me what you want to do.
    Do you want to get rid of the input box & just use the row where expected was found?

  17. #17
    Forum Contributor
    Join Date
    05-26-2016
    Location
    India
    MS-Off Ver
    Microsoft 2021
    Posts
    324

    Re: Find Text and input in MSGBOX

    yes I want to extract the data right after my keyword available...

  18. #18
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,072

    Re: Find Text and input in MSGBOX

    In that case remove the input box line & just use
    Please Login or Register  to view this content.

  19. #19
    Forum Contributor
    Join Date
    05-26-2016
    Location
    India
    MS-Off Ver
    Microsoft 2021
    Posts
    324

    Re: Find Text and input in MSGBOX

    Quote Originally Posted by Fluff13 View Post
    In that case remove the input box line & just use
    Please Login or Register  to view this content.
    Thanks for great idea which were missing by me .. It is working fine

  20. #20
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,072

    Re: Find Text and input in MSGBOX

    You're welcome & thanks for the feedback.

  21. #21
    Forum Contributor
    Join Date
    05-26-2016
    Location
    India
    MS-Off Ver
    Microsoft 2021
    Posts
    324

    Re: Find Text and input in MSGBOX

    is it posible that we just extract the information on Result sheet for next 100 rows
    for example starting row num is 15 so we will extract information in from 15 to 115 row number.
    it is just becaue I tried on my actual file it is giving error but on sample file it is working fine.

  22. #22
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,072

    Re: Find Text and input in MSGBOX

    To just look at 100 rows use
    Please Login or Register  to view this content.

  23. #23
    Forum Contributor
    Join Date
    05-26-2016
    Location
    India
    MS-Off Ver
    Microsoft 2021
    Posts
    324

    Re: Find Text and input in MSGBOX

    Quote Originally Posted by Fluff13 View Post
    To just look at 100 rows use
    Please Login or Register  to view this content.
    That great, I am inspired by you as I am learning VBA for the last few days and I am getting too much knowledge from this kind of example.
    All solved, Appreciate your efforts. God Bless u

  24. #24
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,072

    Re: Find Text and input in MSGBOX

    Glad to help.

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

    Re: Find Text and input in MSGBOX

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. No help to be offered until the link is provided.)
    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

+ 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. Having issue wth msgbox & input box
    By dumdumbum in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-29-2020, 09:58 AM
  2. Find text in all rows of column and input text into cell next to it
    By Empumpu in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-03-2015, 08:20 AM
  3. [SOLVED] Find certain text and delete row then show MsgBox
    By D_N_L in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-02-2014, 09:04 AM
  4. a macro to find text based on user input
    By J4kub in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-14-2013, 07:46 AM
  5. Help Searching a database to find text that was input
    By jchapm123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-28-2010, 01:59 PM
  6. a macro to find text based on user input
    By CDPRINT in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 08-29-2010, 12:23 PM
  7. Input Title on MsgBox
    By pkeegs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-07-2006, 06:20 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