Consulting

Results 1 to 6 of 6

Thread: Solved: Controls.Remove causes unexpected behavior

  1. #1
    VBAX Tutor nst1107's Avatar
    Joined
    Nov 2008
    Location
    Monticello
    Posts
    245
    Location

    Solved: Controls.Remove causes unexpected behavior

    Does anyone know why using the Controls.Remove method would cause the controls toolbox to appear on a running userform?

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    You don't show enough information for me to know.

    Do you open the VBE with your code or select the userform?

    My best question and the one I hope you responde to is, why are you removing controls on the fly?
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3
    VBAX Tutor nst1107's Avatar
    Joined
    Nov 2008
    Location
    Monticello
    Posts
    245
    Location
    Sorry, I knew that was way to brief, but I wasn't sure what information to include. It seems like a complicated problem and I'm afraid may be tied to API calls.

    The controls are labels that are added and removed at run time to reflect changes made by the user in other areas of the form. So, no, I do not open the VBE with the code.

    If you need to see the workbook, I can post it, but it's large.

  4. #4
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Why not just hide them and show them?
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  5. #5
    VBAX Tutor nst1107's Avatar
    Joined
    Nov 2008
    Location
    Monticello
    Posts
    245
    Location
    That would work.... Probably what I should have done in the first place.

  6. #6
    VBAX Tutor nst1107's Avatar
    Joined
    Nov 2008
    Location
    Monticello
    Posts
    245
    Location
    Thanks.

Posting Permissions

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