+ Reply to Thread
Results 1 to 5 of 5

Userform strange behavior

  1. #1
    Registered User
    Join Date
    02-07-2007
    Posts
    4

    Userform strange behavior

    I've attached a copy of the Excel userform I've been trying to create, and for some reason when switching between worksheets the 1st single word from the previous sheet's cell is replaces the 1st word in the next worksheet whenever I use my command buttons to toggle thru current worksheets fields while in the Excel userform.
    Attached Files Attached Files
    Last edited by Shaun_email; 02-08-2007 at 10:32 AM.

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    There are no attachements

  3. #3
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    I hope I understand your problem correctly

    It is not just the 1st word that is being replaced but all data

    When using the option buttion to select which network worksheet you are looking at You are not saving the displayed data before changing sheets, As the form is already loaded using Load WANInventory will not trigger UserForm_Activate macro.

    When you click on the next button because it has data from the previous worksheet still displayed in the form the SaveRow macro overwrites the data on the current active worksheet with the data displayed in the form

    using the following code should fix you problem.
    Add similar code for other options as well

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    02-07-2007
    Posts
    4

    What if I don't want to save

    Thank you for your time, this is an excellent forum, and while reading responses to posting everyone is so positive to those like me who are just starting to get their feet wet. Question if I save am I actually writing to the file? This form is to be used by our NOC and I only want them to view the data.

    Thanks again..

  5. #5
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    In the book you posted the SaveRow macro is called by several other macros, cmdPrev_Click, cmdNext_Click, cmdAdd_Click, cmdClose_Click.

    Each time it is called it will replace data on the active sheet with the data that is in the displayed form.

    If you want to restrict the people that have approval to save/overide the data then I would suggest using this SaveRow macro. It users the PC's User ID to allow access to the save commands - Replace the names in Red with valid PC User ID's

    Please Login or Register  to view this content.

+ 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