Consulting

Results 1 to 8 of 8

Thread: 2 separate change events code issue (Floating Cmd Button & List box selection)

  1. #1
    VBAX Contributor
    Joined
    Jul 2011
    Location
    Manchester
    Posts
    142
    Location

    2 separate change events code issue (Floating Cmd Button & List box selection)

    Hi everyone

    I posted a few days ago because i had been asked to set up a workbook to allow users to select multiple items from a drop down list which i managed to get working and posted the code / marked my thread as solved.

    However, in getting this to work it has caused a problem with a floating command button i use on most workbooks as a MENU. Basically the cmd button moves near the active cell so even if the user in deep in a worksheet the menu button is there and they don't have to scroll to the top. Now i have the multiple drop down list selection this no longer works properly.

    I have attached an example workbook with 2 sheets, the first has the code allowing users to select multiple items form drop down lists and the second shows how the floating command button should work.

    Can anyone help tweak the code so the command button floats properly on the same page as the multiple drop down list page?

    thanks

    MykalMultiple Selection Drop down lists.xlsm

  2. #2
    VBAX Master paulked's Avatar
    Joined
    Apr 2006
    Posts
    1,007
    Location
    You hadn't got the Selection_Change code in Sheet1 code module.


    In future, I'd avoid naming objects with cell references (Cmd1, Cmd2 etc) so I've renamed them CmdB1 & CmdB2.
    Attached Files Attached Files
    Semper in excretia sumus; solum profundum variat.

  3. #3
    VBAX Contributor
    Joined
    Jul 2011
    Location
    Manchester
    Posts
    142
    Location
    Quote Originally Posted by paulked View Post
    You hadn't got the Selection_Change code in Sheet1 code module.


    In future, I'd avoid naming objects with cell references (Cmd1, Cmd2 etc) so I've renamed them CmdB1 & CmdB2.
    Hi and thank you for looking at this for me. I have downloaded the workbook you looked at and the floating button works but i am only able to select a single item from the drop down lists!

    I split the code into 2 sheets to show how each works independently but as soon as i put them in same sheet the drop down list only allows a single selection

    Mykal
    Last edited by mykal66; 12-11-2019 at 03:47 AM. Reason: Describe the issue better

  4. #4
    VBAX Master paulked's Avatar
    Joined
    Apr 2006
    Posts
    1,007
    Location
    I turned off EnableEvents earlier in the proc and it seems to work, try it
    Attached Files Attached Files
    Semper in excretia sumus; solum profundum variat.

  5. #5
    VBAX Contributor
    Joined
    Jul 2011
    Location
    Manchester
    Posts
    142
    Location
    Quote Originally Posted by paulked View Post
    I turned off EnableEvents earlier in the proc and it seems to work, try it
    PERFECT. Thank you so much, really appreciate your help.

    Barry

  6. #6
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,844
    Test the attached.
    Attached Files Attached Files
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  7. #7
    VBAX Contributor
    Joined
    Jul 2011
    Location
    Manchester
    Posts
    142
    Location
    Quote Originally Posted by p45cal View Post
    Test the attached.
    Hi. Thanks this works too. Appreciate you time and help

    Mykal

  8. #8
    VBAX Master paulked's Avatar
    Joined
    Apr 2006
    Posts
    1,007
    Location
    We actually did exactly the same thing

    You're welcome
    Semper in excretia sumus; solum profundum variat.

Tags for this Thread

Posting Permissions

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