PDA

View Full Version : [SOLVED] 2 separate change events code issue (Floating Cmd Button & List box selection)



mykal66
12-11-2019, 02:04 AM
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

Mykal25614

paulked
12-11-2019, 03:26 AM
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.

mykal66
12-11-2019, 03:31 AM
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

paulked
12-11-2019, 03:56 AM
I turned off EnableEvents earlier in the proc and it seems to work, try it

mykal66
12-11-2019, 03:59 AM
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

p45cal
12-11-2019, 04:02 AM
Test the attached.

mykal66
12-11-2019, 04:05 AM
Test the attached.

Hi. Thanks this works too. Appreciate you time and help

Mykal

paulked
12-11-2019, 04:21 AM
We actually did exactly the same thing ;)

You're welcome :thumb