+ Reply to Thread
Results 1 to 5 of 5

Need help troubleshooting userform

  1. #1
    Registered User
    Join Date
    12-14-2012
    Location
    Prince Rupert, BC
    MS-Off Ver
    Excel 2010
    Posts
    10

    Need help troubleshooting userform

    In testing this userform template, I've encountered an "undocumented feature" that has me stumped.

    If I use the form to view an existing record (using the navigation buttons on the form) and edit any field other than the Craft listbox, the Craft listbox value seems to disappear when I click on the Save button. If I click Cancel, the clean value from the datasheet is successfully retrieved again. Until I make a new selection in the Craft listbox, however, the same thing keeps happening every time I try to save after editing another field. If I make a new selection in the Craft listbox, I can successfully save the edits to the datasheet. This issue only seems to occur on the first record I edit. Once I have successfully saved one record (either a new record, or an edited record that I have re-selected the Craft item), everything works fine. I can edit other existing records (or that same one) without any issues.

    To sum up:
    First attempt to edit existing records after opening file -> Craft list selection disappears when Save button clicked -> must make new Craft selection in order to save edits OR must create and save a new record before attempting to edit existing records.

    I've been searching through all the code, but can't find anything that seems to explain it (although, in fairness, I am pretty new to VBA). Does anyone else know why this would be happening? File attached below:

    worklogv3.2.1.xlsm

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,517

    Re: Need help troubleshooting userform

    I've downloaded the workbook but as soon as it opens I get an error here.
    Please Login or Register  to view this content.
    When I goto Tools>References... I saw this - MISSING: SEP Date/Time Controls.

    If I uncheck that reference, change vbModaless to vbModeless and rerun the Open event a form opens.

    However if I try to close that form I can't do it without clicking the Close Form button which then closes the form and the workbook.

    Basically, what I'm trying to say is that it's hard to find what's happening.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    12-14-2012
    Location
    Prince Rupert, BC
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Need help troubleshooting userform

    I do have the form set up so that the form closes the file. It's to make sure our users (some of whom are not very tech savvy) don't accidentally leave the file open once they are done (all their entries and edits will be via the form). It's modeless so they can access other files while they have the form open (I got modaless from another example on the internet - it looked odd to me, but it seemed to work). The form has been opening and working fine for me, other than that weird hiccup with saving my first edit after opening. When I work on the form/vba, I just open the vba editor and can stop or run the form from there while keeping the file open. There is also one tab that is currently hidden - it just has the list source for the comboboxes.

  4. #4
    Registered User
    Join Date
    12-14-2012
    Location
    Prince Rupert, BC
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Need help troubleshooting userform

    Hi Norie,

    I've opened up the file at work and corrected Modaless to Modeless, but I don't get that MISSING: SEP Date/Time Controls that you mentioned in Tools>References. I see it checked off in my available references list, but I don't see an error anywhere. Am I looking in the wrong place?

  5. #5
    Registered User
    Join Date
    12-14-2012
    Location
    Prince Rupert, BC
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Need help troubleshooting userform

    All I've found online so far that might point at the root of the problem is references to MS Knowledgebase "ListBox Text Property Not Functional (Q181281)". It looks like what I'm seeing might be an "undocumented feature". Since the form seems to work fine after an initial successful save, I added "ThisWorkbook.Save" to my GetData sub. Fingers crossed, but so far it seems to be successfully working around the issue.
    .
    .
    .
    Well, not quite. It worked for a while, now it's just doing the same thing again.
    Last edited by dragonabsurdum; 08-30-2013 at 06:56 PM.

+ 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. Troubleshooting the worksheet?
    By fatmermaid in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-08-2011, 10:24 AM
  2. Troubleshooting If statement
    By dcgrove in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-12-2011, 12:09 PM
  3. troubleshooting SUMPRODUCT
    By rob_barbour in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-02-2007, 01:50 PM
  4. troubleshooting generate
    By Don Juan in forum Excel General
    Replies: 0
    Last Post: 10-01-2006, 05:29 PM
  5. SUMPRODUCT troubleshooting
    By CathB in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-10-2006, 10:10 AM

Tags for this Thread

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