+ Reply to Thread
Results 1 to 16 of 16

Textbox data update in selected row

  1. #1
    Forum Contributor
    Join Date
    02-16-2011
    Location
    Maharashtra, Thane
    MS-Off Ver
    Excel 2021
    Posts
    242

    Textbox data update in selected row

    Hi,
    I have used a programme and here in Data sheet and working on M, N and O column.
    First I have used a form in textbox 1 if will type “pending” all the pending list opened in listbox based of O column. And when click it the required data opened in textboxes but when I am putting date in Textbox6 or Textbox7 it will update in the second row only instead of the selected row.
    Secondly in O column will update Clear when M & N both column cells get filled and it will show keep pending if any one is blank. Request to see where I stuck. Thanks.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    03-05-2025
    Location
    Deutschland
    MS-Off Ver
    MS Office Home & Business 2024
    Posts
    487

    Re: Textbox data update in selected row

    Hi,

    replace this part of you code for the button in userform.

    Please Login or Register  to view this content.
    BR, Alexandra
    Last edited by cysu11; 07-04-2025 at 06:50 AM. Reason: Second issue corrected also...
    Best regards, Alexandra

    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved"

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,569

    Re: Textbox data update in selected row

    Another one.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  4. #4
    Forum Contributor
    Join Date
    02-16-2011
    Location
    Maharashtra, Thane
    MS-Off Ver
    Excel 2021
    Posts
    242

    Re: Textbox data update in selected row

    Thank you both the Sirs. I have used Bakerman sirs code because here date format is exactly updating in sheet. Cysu sirs date is update just opposite in sheet like when i am typing 04-05-2025 (04-Apr-2025) it is updating 05-04-2025. Rest all are ok.
    One small query here. When text box is populating here the first row date is also shown opposite. I need it will show as exactly mentioned in sheet like dd-mmm-yyyy format. Please have a look at this.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,297

    Re: Textbox data update in selected row

    See attached

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  6. #6
    Forum Contributor
    Join Date
    02-16-2011
    Location
    Maharashtra, Thane
    MS-Off Ver
    Excel 2021
    Posts
    242

    Re: Textbox data update in selected row

    Dear Josh Sir your work tried and works fine. Only need two small changes there.
    1. Need header in listbox at the time of populate data
    2. Column M and N will be empty and i will put date time to time and when i have added or edited date with changes date format like "dd-mmm-yyyy" it is updating like 05-04-2025 instead of 05-Apr-2025. I need date formula dd-mmm-yyyy in every date place. Thanks.

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,297

    Re: Textbox data update in selected row

    Change "dd-mm-yyyy" to "dd-mmm-yyyy".

    See attached
    Attached Files Attached Files
    Last edited by JohnTopley; 07-04-2025 at 03:13 PM.

  8. #8
    Forum Contributor
    Join Date
    02-16-2011
    Location
    Maharashtra, Thane
    MS-Off Ver
    Excel 2021
    Posts
    242

    Re: Textbox data update in selected row

    John Sir superb. All the code is working super fine. Thank you very much to provide total solution in this regard.

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,297

    Re: Textbox data update in selected row

    You're welcome and thank you for the rep.

  10. #10
    Forum Contributor
    Join Date
    02-16-2011
    Location
    Maharashtra, Thane
    MS-Off Ver
    Excel 2021
    Posts
    242

    Re: Textbox data update in selected row

    Dear John Sir,
    Sorry to trouble again. I have go an error in the attached file.
    First when i deleted all the data in M and N column and click a record in listbox it will shown an error and in list box it is highlighted in yellow
    Please Login or Register  to view this content.
    Secondly when i will put a date in textbox6 it will update in M column without given any error and it is not mandatory to fill both textbox dates at once in 6 and 7.
    Request your help in this.
    Attached Files Attached Files

  11. #11
    Valued Forum Contributor MikeVol's Avatar
    Join Date
    12-30-2020
    Location
    Odessa / Ukraine
    MS-Off Ver
    MSO Prof Plus 2021 x64 (En)
    Posts
    577

    Re: Textbox data update in selected row

    Hello @shyampanda.
    Forgive me @JohnTopley. The error is because there is no data in the cells and you want to format the date in TextBoxes without the data itself.
    Please Login or Register  to view this content.
    Good luck.
    Last edited by MikeVol; 07-06-2025 at 08:38 AM. Reason: Update
    NOTE: As the original poster/owner, only you can mark your thread as SOLVED (Thread Tools above Post #1).
    You can say "Thanks" in your thread to everyone who offered to help you.
    You can also reward them by clicking * "Add Reputation" under their username on the left.
    With Regards, MikeVol.

  12. #12
    Forum Contributor
    Join Date
    02-16-2011
    Location
    Maharashtra, Thane
    MS-Off Ver
    Excel 2021
    Posts
    242

    Re: Textbox data update in selected row

    Thanks Mike Sir. Now listbox is not given any error but at the time of put date in textbox6 it will give error. But data uploaded. I want data update without any error. If will fill both textboxes i.e. textbox6 and 7 it is not showing error but only filled of textbox 6 and click on command button showing error.

  13. #13
    Valued Forum Contributor MikeVol's Avatar
    Join Date
    12-30-2020
    Location
    Odessa / Ukraine
    MS-Off Ver
    MSO Prof Plus 2021 x64 (En)
    Posts
    577

    Re: Textbox data update in selected row

    @shyampanda, See attached. Be careful! There are modifications in the code and in the form itself!

  14. #14
    Forum Contributor
    Join Date
    02-16-2011
    Location
    Maharashtra, Thane
    MS-Off Ver
    Excel 2021
    Posts
    242

    Re: Textbox data update in selected row

    Thanks Mike Sir for your help but the code is running when i have filled both the blank textboxes. if i will put date in textbox6 and click on Submit then it will show message and not updated. I want the date will fill either to put a single date and another date may be filled later.

  15. #15
    Valued Forum Contributor MikeVol's Avatar
    Join Date
    12-30-2020
    Location
    Odessa / Ukraine
    MS-Off Ver
    MSO Prof Plus 2021 x64 (En)
    Posts
    577

    Re: Textbox data update in selected row

    Oh, my bad, sorry.
    Please Login or Register  to view this content.

  16. #16
    Forum Contributor
    Join Date
    02-16-2011
    Location
    Maharashtra, Thane
    MS-Off Ver
    Excel 2021
    Posts
    242

    Re: Textbox data update in selected row

    Mike Sir. now it's fine. No error. Smooth running. Thank you very much..

+ 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. Selected data to be displayed in userform textbox
    By cklee in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-12-2015, 09:48 AM
  2. How is it possible to fill in data from a textbox into a selected row in a listbox
    By vbastarter14 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-02-2014, 02:23 PM
  3. Update worksheet with textbox data
    By Jovillanueva in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-28-2014, 05:53 AM
  4. [SOLVED] Userform textbox to view data, not update data
    By millerj64 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-26-2012, 01:20 PM
  5. Use textbox input and VLookup to update another textbox on same userform
    By gcoug in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-22-2011, 10:39 AM
  6. update data based on listbox & textbox
    By SarahPintal in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-13-2010, 02:37 AM
  7. Highlight all Text in a Textbox when the textbox is selected
    By RPIJG in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-28-2005, 03:28 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