Results 1 to 15 of 15

Thread: vba find text paste text in message box next cell

  1. #1

    vba find text paste text in message box next cell

    hello, my skills is not enough to finnich my project.
    i got a work task sheet, and i need the finniched work to register on the correct cell in the correct month sheet

    i need a vba to look for the same date as in cell J6 - J46 (the selected row/cell in that range)
    look for the same text as in L6 - L 46 (the selected row in that range)
    vba need to find the text and date in the sheets: Januar Februar Mars April Mai Juni Juli August September Oktober November
    dates is lokated in range D3 - DU3
    text is located in range B6 - DU17

    when the cell with the same text is found i need the vba to input user spessifyed text in message box in the collomn to the right for the text that was found.

    J6 contains date 13/3/19 (dd-mm-yy)
    L6 contains text hello
    vba find this date in sheet Mars AX3
    vba find this text in sheet Mars AX6

    (this is to end work task and user need to input what is done)
    vba ask user for what is done (in text box)
    vba then paste the users text in the cell to the right, AY6
    vba ask user what date work was done and paste this date in 2'nd cell to the right AZ6 (dd-mm-yy)
    vba ask user for name and paste the name in the 3'nd cell to the right BA6
    all this would be nice to have in the same text box

    when name is entered in BA6 the task is not longer present in the Dagplan sheet (its done by formula no vba needed)
    i can not change anything bechause its all connected to other workbooks and the tasks come from other workwooks, but work done is registred in this workbook.

    hopefully someone could help with this

    thank you

  2. #2
    file is to big to be uploaded 1,3mb (stupid low limit?)

  3. #3

    here is a few pictures, read description and its clear what i need help for

  4. #4
    here is the file
    Attached Files Attached Files

  5. #5
    turns out that its not so easy to understand only by text so i had to translate and simplyfy the sheet. here it is
    Attached Files Attached Files

  6. #6
    VBAX Mentor 大灰狼1976's Avatar
    Dec 2018
    SuZhou China
    Hi martinrusten!
    Please refer to the attachment.
    Attached Files Attached Files

  7. #7
    VBAX Mentor 大灰狼1976's Avatar
    Dec 2018
    SuZhou China
    TextBox2 = Format(Dat, "d-m-yy")
    TextBox2 = Format(.Cells(mch.Row, rng.Column + 2), "d/m/yy")

  8. #8

  9. #9
    Quote Originally Posted by Fluff View Post
    Cross posted on multiple sites
    yes i put this up to several forums bechause i would like to solve it quickly, and it do not seems like its a lot of peoples out there that can solve this
    so i was upping the ods.

    here is the forum links:

    if this is solved i wil post the link to the forum that solved it and also mark post as solved
    Last edited by martinrusten; 03-15-2019 at 04:39 PM.

  10. #10
    its also listed here:

    not allowed to post more than 3 links in one post

  11. #11
    Quote Originally Posted by 大灰狼1976 View Post
    TextBox2 = Format(Dat, "d-m-yy")
    TextBox2 = Format(.Cells(mch.Row, rng.Column + 2), "d/m/yy")

    thank you, did you look at the sheet Mars? i put another description there BF15

    im sorry but i do not have enough knowlege to make something like this, i can frankenstein a macro together somehow, but this is totally new ground to me.

    the button Cancel do not do anything (should close the window)

    the button Ok do something but i dont know what, didnt find the text anywhere
    the Ok button should compare the date in the "Date registred" collumn for the clicked row with all dates in the mounth sheets.

    when date is found vba need to find the same machine name as the one in clicked row under the newly found date. look at the Mars sheet and date 15/3-19 and you wil see what i mean

    then the user specifyed text neet to be written in the "what is done" collumn
    same goes for the day of repair (should be date of repair, my bad)
    and the same goes for "Sign" witch is user's name initials

  12. #12

    not finding name and date

    i mannaged to make a few changes, it work where is should and vba ends when it need to, and added todays date on textbox2 (user can change it if nessesarly hopefully it works)
    also added error message for the end user to see.

    and the vba can not find machine name and the date.

    i was playing around with this and was googling all sort of functions but i can not make it work, so have to ask you proffessionales again

    here is the edeted file

    work to do list 2019 (2).xlsm

  13. #13
    2.jpg this is what the vba should do, but it only turn itself off

  14. #14



    big thanks to Christofer Weber that made this work

    and big thanks to 大灰狼1976 that made all the work
    at this forum, my hat off for you sir!!

    if someone need to download the complete file, its attached here

    thank you all
    Attached Files Attached Files

  15. #15
    VBAX Mentor 大灰狼1976's Avatar
    Dec 2018
    SuZhou China
    You're welcome.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts