I am trying to use a ActiveX Listbox but the click event will not trigger.
Basically I want to a user to click on the list box, activating it, then proceed to click on cells in a specified range which will then add that cells content to the Listbox until the user selects another ActiveX Control or a cell outside the specified range.
I post the code but I dont have any because it will need the click event but basically I planed on using a do while loop that will add the selected cell contents on a click event with some if statements that will deselect the listbox if a cell section occurs outside of the specified range or another control is selected.
Related
I am aware that this thread already exists:
Hide DropDown list for ComboBox without losing focus
But unfortunately, it is for a UserForm and isn't applying to my questions.
My situation is rather on a Worksheet like below:
In fact, to show that dropdown list, here is what I did:
shLedgerImport.CboAcctCode.DropDown 'This function shows the dropdown list
But once it appears, I cannot hide it anymore:
---> I just want it to hide that dropdown list when I click on E2, of H5 or anywhere except E9 that is the ActiveCell.
(In case the user displayed it by mistake and want it to hide, what they need to do? Escape key isn't working, Click elsewhere isn't working)
Thank you
To overcome the Protection Limitation of Autofiltered ranges (see my Answer to: VBA Excel - How to lock specific cells but allow filtering and sorting) I have a desire to respond to the user clicking an Autofilter Button (at which point I can unprotect the sheet and allow the filtering). I can't find any event that triggers when the user clicks an autofilter button so instead I have instructed my users to first select an Autofilter row's cell (an event I can recognize) before clicking the cell's Autofilter button.
This is a mostly-reasonable workround but it does require the users to work in a non-standard way. Is there any way to capture that an autofilter button (on a locked cell) has been clicked?
Many thanks
I have a workbook that has many checkboxes (form control) on one tab. I check the box (Yes/No/NA) based on values in other tabs,. The tab with the checkboxes, is a form that was created, that needs to be printed, but the users cannot click any of the boxes because these decisions are driven by formulas.
I have locked the workbook & unchecked all the boxes in the popup.
So the question is, how do I prevent all the check boxes from being clicked/checked??
AHIA,
LarryR...
For a Form Control:
Right-click and select Format Control...
Select the Protection tab.
Make sure that Locked is checked
Select the Control tab.
Choose a cell in the Cell Link field.
Press OK.
Right-click on the cell that you referenced in step 5.
Select Format Cells...
Select the Protection tab.
Make sure that Locked is checked.
Select Hidden if you don't want users to see it.
Press OK.
Right-Click on the Worksheet Tab
Select Protect Sheet
Make sure that Protect worksheet and contents of locked cells is checked.
That should do it!
Protect the cells with the check-boxes, and when you click on protect Sheet uncheck the Select locked cells from the list of what the users are allowed to do after the document is locked; that way they'll be able to see but not click on those cells.
Got the same issue and ive solved the issue by right click on the sheets and there is a grouping selection, ungroup it and the checkbox works again.
Is it possible to have a macro that, when pressed, pops up a message box asking for a string of text, and then a drop down that has a list of categories?
All I would need it to do is take this information and save it into a cell. If so, how?
[I'm going based on Excel 2007 here, but if you're using 2003, you'll have to navigate the menu structure]
Go to the VBE (by going to the View tab, then click on Macro - creating or editing an existing one will take you there - or click Alt+F11).
Go to the Insert menu, and select Userform. Drag a textbox (the ab|icon), and a combobox onto your form. To set the textbox value to a cell when you change the combobox, create a subroutine in the code to do this by double clicking on the combobox.
Set the combobox items by using the .additem method of comboBox1 in your code. These can be delineated or grabbed from a range in your code (see here)
Within that subroutine, set the value of whatever cell you want to textbox1.Text, which is the contents of the textbox.
I wanted to know after I initialize a combobox, is there a possibility that I can still stay active with the background Excel sheet using the cursor like scroll the sheet up/down, type words on the sheet, etc?
(While at the same time the combobox still stays on top of the Excel sheet doing whatever event you might want to do with your VBA?)
Go to the VBA IDE and select your form. In the properties list (on the left hand side of the screen), find the ShowModal property. Set this to False.
This will prevent the dialog from taking over the window.