Checkboxes VS Buttons - vba

Please find the following workbook https://dl.dropbox.com/u/69651453/fff.xlsm , is there a way we can instead use checkboxes? In the sense that one can de-check and the copied rows for that button are deleted and the gap closed again?
Also is there a way to disable check-boxes, depending on values in the sheet. In our case, if ANY invalid data is detected in the sheet, the checkboxes are greyed out... or blocked somehow.
Any Active X solutions would be appreciated too.
Thanks

If you use checkboxes and bind them to that specific cell then treat the cell's click event as you are the button click event it should function the same way.

Related

Form Option Button Reset Macro

I am looking for a simple macro I could activate with a form control button that would clear all of the form control option buttons on my sheet.
I have lists of options for industrial part specifications, of which only one may be selected per section. However, once one is selected, the form control option button stays filled in. I previously circumvented this by using checkboxes, where if you click the box again it will remove the check mark. However once I learned that I was to create the form in such a way that only one option could be selected per section, (for ease of use in case a less computer minded person were to use it) it became clear that option buttons were the right way to go.
So I need a simple macro that I can activate with a button that will clear these option buttons all to blank, as if none were selected. I have looked and tried some strings of code, but none have worked so far. Perhaps I am missing something obvious or looking for the wrong thing, but I dont think I am.
I have checked the following pages and tried their code:
http://www.mrexcel.com/forum/excel-questions/689865-how-clear-all-checkboxes-option-buttons-list-boxes-form-3.html
Re-setting all option buttons at once
http://www.excel-easy.com/vba/examples/option-buttons.html
I feel like this should be simple. A VBA macro code that will reset the FORM CONTROL Option Buttons to blank (which I believe is the false state?). No need to worry about having specific ranges to clear; one button to reset the sheet will do perfectly.
Thanks in advance for any help.
Cycle through the Shapes collection:
Sub Reset()
For Each vCtrl In ActiveSheet.Shapes
vCtrl.DrawingObject.Value = False
Next
End Sub

Can I close an ActiveX combobox placed on an Excel worksheet?

I can open the combobox using object.dropdown but this isn't a True/False scenario. I'm using this to force the combobox to display the list but it remains on the screen when switching worksheets unless it is manually closed or an item selected. Any thoughts? Thanks.
Best I could come up with is to select the default value when the sheet deactivate event is triggered. The default value is not valid in my application and it tests for it before running the report so this shouldn't cause me any issues.

DOJO indirect selection to be checked when row data gets changed

I have a dojo editable datagrid with indirect selection plug-in. Now my requirement to select the check box of indirect select when user changes the data in row . Please help me how i can achive this.
Try it by the event onRowClick. If a user clicks into one cell, then the event fires.
Here's the reference : http://dojotoolkit.org/reference-guide/1.8/dojox
And this SO-Thread seems to solve your Problem: Row Selection in Enhanced Grid
Regards

How to use Mouseout Function in VBA with a condition Check?

Hi I have a VBA application with a combobox selection option.One of the combobox option is Other which when user select that option an invisibled label will pops up and prompt the user to fill the txtOther control.now my question is how I can get rid of the prompted label and make it to invisible after user fill the txtOther and move(focused)in other control?
here is a shot of my app:
Thanks for your time and help
It depends on how often or when you want the check to be done. I couldn't find a good reference to show you all of this, but you can view your VBE.
Within the code behind your userform you can use events for the text box.
If you want the check done every time you leave the text box:
Use the TextBox_Exit event.
If you want it to fire whenever the contents are changed, used TextBox_Change. There's lots of options, but based on your explanation I'd probably use Exit.
This answer shows some syntax examples for using the Textbox_Exit event.

DataGridView and checkboxes re-selecting automatically

I have a strange problem with a DataGridView I'm using which is bound to a table in VB.net
I've added a checkbox column to allow a user to tick a bunch of rows that I can then loop through and save off to a different table. All the checkboxes are enabled by default. So it's really a case of unchecking the rows which aren't required.
However, the DataGridView re-enables any checkbox that I click after I click on a checkbox in another row. So in effect, only one row can be unchecked at a time.
I'm sure I'm probably missing something obvious here?
EDIT: I forgot to mention this is a Windows form, not an ASP.net application.
I think this is what is happening. Please check if you have checked IsPostback while binding the datagridview. I think the click event of the checkbox is initiating a postback and it is rebinding itself.
HTH
I think the grid is refreshing and then redrawing the default values...
I got it working in the end, although I'm not sure exactly how. It must have been some property that I tweaked in the grid