+ Reply to Thread
Results 1 to 7 of 7

Unable to match Textbox comments in a Userform

  1. #1
    Registered User
    Join Date
    09-15-2011
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    82

    Unable to match Textbox comments in a Userform

    Hi Everyone

    I'am hoping someone will be able to help me.

    I have a Desk Booking Workbook that was used in our old office. Since we moved office I was tasked to alter it to match the new 1st floor we use in our new office. I was able to alter the userform so it reflects our new floor layout but my knowledge of VBA is very limited. I have tried to alter the code so that when booking a desk the users name appears in the correct textbox but I cannot see or workout why when I use it the names appear in the wrong desk. To be honest i dont know VBA very well at all and am scratching my head with this.

    Can someone if they have the time have a look at the code and hopefully help put it right.

    I have attached a copy of the workbook. The overwrite password is "Kate"

    Thanks very much if someone can help with this

    Ortz
    Attached Files Attached Files
    Last edited by Ortz; 07-01-2014 at 07:29 PM.

  2. #2
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Unable to match Textbox comments in a Userform

    I would like to help, but I don't quite understand how to use this form or what data you want to appear where.
    Perhaps if you were to enter some data and show maybe a screen print with what it does I maybe able to help
    Regards
    Sean

    Please add to my reputation if you think i helped
    (click on the star below the post)
    Mark threads as "Solved" if you have your answer
    (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code:
    [code] Your code here [code]
    Please supply a workbook containing example Data:
    It makes its easier to answer your problem & saves time!

  3. #3
    Registered User
    Join Date
    09-15-2011
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Unable to match Textbox comments in a Userform

    Hi Sean

    Thanks for replying. I just noticed when I try to open the workbook from the site here it has a runtime error 91, but it opens fine on my PC.

    When the workbook opens it displays the Userform as seen below:

    a.jpg

    When someone wants to book a desk they double click in the desk textbox they want to book which brings up this Frame

    c.jpg

    In the submit textbox they time in a comment such as the time they are booking the desk and when they press submit it enters that detail in the corresponding desk which then changes colour to red to show its booked as below.

    b.jpg

    But whats happening is , for example, if someone is wanting to book Desk 1, when they double click, enter details in the submit box in the frame its booking desk 4 not desk 1 and the remainder of the desks are not booking correctly. Hope that helps some Seam.

  4. #4
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Unable to match Textbox comments in a Userform

    Hi,
    I have updated the code.
    Basically the textboxes were pulling the data from the wrong cells when submitting the data.

  5. #5
    Registered User
    Join Date
    09-15-2011
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Unable to match Textbox comments in a Userform

    Thats fantastic Sean, thank you very much.

    Just so I have a better understanding, what part of the code was wrong and what needed to be changed, if you have time to explain.

    Again thanks a lot Sean

    Ortz

  6. #6
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Unable to match Textbox comments in a Userform

    When ever a text box is double clicked it runs a procedure for that texbox.
    Please Login or Register  to view this content.
    This line determines the cell in the data sheet to either pull the value from or add the new value to.
    Please Login or Register  to view this content.
    in this case the 16 was a different number, so when you submitted it, it went to the wrong cell. So another part of the code would pull a different cell value in.
    The .offset(0,16).address means if the active cell was A2 then it would be locating the address of the cell on the same row but 16 columns along.

    Hope that helps.

  7. #7
    Registered User
    Join Date
    09-15-2011
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Unable to match Textbox comments in a Userform

    Thanks for that Sean

    I see that now, thank you for the explanation.

    Regards

    Ortz

+ 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] Vba vlookup & match value in combobox and textbox on a userform
    By kboy1289 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 12-13-2013, 03:24 PM
  2. How to Chr(10) Textbox.Text and a Index(Match()) value in VBA Userform
    By Joe Walsh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-30-2013, 11:37 AM
  3. Replies: 3
    Last Post: 11-08-2012, 07:25 PM
  4. [SOLVED] Userform Match - unable to get the match property of the worksheetfunction class - Help!
    By Tayque_J_Holmes in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-10-2012, 11:01 AM
  5. [SOLVED] Unable to edit Userform Textbox after formatting in VB
    By Baziwan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2012, 08:54 AM

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