+ Reply to Thread
Results 1 to 3 of 3

Buttons on userform not behaving correctly.

  1. #1
    Registered User
    Join Date
    06-20-2013
    Location
    NE GA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Buttons on userform not behaving correctly.

    Hello,

    I have a user form that is not working the way I want it to. The previous and next buttons are deleting the first row of data when they are used.

    Also, I can’t figure out how to get a certain function to work. I would like to be able to search rows using the tracking number field, load that row of data and then add information to that row.

    The final result I am working towards is a single user form that will allow me to add rows of data, save the spreadsheet, then search one column of all rows for a match, add information to that row and save the changes.

    I have attached the workbook showing my current progress.

    Any help will be greatly appreciated.


    Test 1 Internal Courier Tracking - Copy.xlsm
    Last edited by atv35; 06-20-2013 at 11:54 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    Re: Buttons on userform not behaving correctly.

    here's the modified code for the next and prev buttons, if there are blanks, ie when you open the form it is overwriting the data in your range with those blanks, these if statements say if the userform has a blank then do nothing since it is just like flipping a page. in the long run you will need to add code that recognizes changes to each = UserForm1.name.value so if you make a change it will append the record

    something like, tn = UserForm1.txtTrackingNumber.Value

    then, if UserForm1.txtTrackingNumber.Value <> tn then Range("A" & CurRow).Value = UserForm1.txtTrackingNumber.Value

    and so on



    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    Re: Buttons on userform not behaving correctly.

    for the second part i would use a second form i added it to your project

    Test 1 Internal Courier Tracking - Copy.xlsm

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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