Consulting

Results 1 to 3 of 3

Thread: Userform problem : makes excel crash

  1. #1
    VBAX Newbie
    Joined
    Jun 2020
    Posts
    2
    Location

    Userform problem : makes excel crash

    Hello everyone I’m new at VBA and this is my first big project, I’ve got this userform that I want to use for client’s interviews.

    The infos are then sent to a database with the option to edit. The problem is that if I enter a new client values and quit & SAVE excel, then reopen excel and the userform, the moment I click on « continue », excel crashes with this error message « Automation error The object invoked has disconnected from its clients » (althought the error message doesn’t always pop).

    This problem is reproduced on other computers and excel versions (I have 2013).It’s odd that the first use of the userform works, but the other times (after saving) cause excel to crash. Is it possible that I have too many controls? Does the order of the controls in the userform needs to be the same as the database? Infinite loop possibilities?

    Is there any better way (with coding) to get a userform / database with this many controls and with the possibility to edit? If yes can you give me any cues, ressources, examples I can start with?I’ve tried to restart on a blank workbook with copying only the content and recreating the userform, but the problem persist.

    I’ve done an excel repair too. For your information, I’ve inspired myself from « Tiger spreadsheet solution » on youtube for my userformDo you have any cues?

    Thanks
    Attached Files Attached Files

  2. #2
    Knowledge Base Approver VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,645
    1. Do not use datepicker or montview controls.
    2. in a worksheet: always use cell A1
    3. Do not start a listobject in another cell than A1
    4. Use a combobox (style=2) filled with valid data, insted of a textbox that has to be 'tested' in a 'class'; see https://www.snb-vba.eu/VBA_Fill_comb...n.html#L_5.4.1
    5. refrain form refedit controls.
    6. integrate the filter routine in the 'new' userform
    7. check VBEditor, tools, references

  3. #3
    VBAX Newbie
    Joined
    Jun 2020
    Posts
    2
    Location
    Thank you for your answer. I'll try that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •