Enabling / Disabling Form Checkboxes Based On Value In A Cell
Apr 2, 2014
I have a sheet with around 3,000 rows of data. I need to be able to enable/disable different comibinations of three checkboxes based on the value of a cell in column D as follows:
If Band says £0k - £75k then all three check boxes should be disabled
If Band says £75k - £250k then the Step 1 check box should be enabled but the Step 2 and Step 3 check boxes should be disabled
If Band says £250k - £500k then the Step 1 and Step 2 check boxes should be enabled and the Step 3 check box should be disabled
If Band says £500k plus then all three check boxes should be enabled
When a checkbox is disabled I'd like it to appear visible but greyed out so it is obvious the option is not available, maybe via conditional formatting. I don't know if this can be achieved within any code rather than having to manually add conditional formatting afterwards?
I've attached a sample to demonstrate. Is this possible to achieve? I'm open to alternative approaches as well if this makes things easier to do. The mere idea of adding 9,000 plus check boxes if already scary!
View 8 Replies
ADVERTISEMENT
Mar 25, 2012
I have some command buttons on a worksheet that I would like to disable, preferably make not visible, until a specific person logs in. I already have code to display worksheets, or hide them, depending on who is logged in. I would like to just add this code to the end of the login procedure, to make these buttons only visible when that person is logged in.
View 3 Replies
View Related
Jun 17, 2014
Is it essential to enable macros in whatever the pc i use, if i am interested in using a form which i created in a different pc with macros. is there a way to avoid this. because each and every time i dont want to change the settings in excel in other pc. the form which i create will be filled by my colleagues and they have to send it back to me.
View 2 Replies
View Related
Oct 31, 2012
I'm using below code for creating check-boxes dynamically on a form:
Code:
Do
Set cb = Me.Controls.Add("forms.checkbox.1", "Cb_" & option_counter, True)
With cb
.Left = 100
.Top = 100 + height_diff
.Caption = Sheet1.Cells(quest_num, option_counter + 1).Value
End With
height_diff = height_diff + 30
option_counter = option_counter + 1
Loop Until option_counter = total_options + 1
It is working fine.....Now after this, I want to check which are the chechboxes whose value is true. How do i do that?
View 4 Replies
View Related
Jun 7, 2006
create a form that will look at the spreadsheet and figure out which of the 32 possible checkboxes will be used and resize accordingly. I can make it so that only the checkboxes I want are visible using the .visible property, but for the sake of aesthetics I'm wondering if there is a way to disable the checkboxes I don't want and to resize the form to fit the checkboxes I do want. I just don't want a form that looks like it has checkboxes put on it at random spots.
View 3 Replies
View Related
Jun 4, 2008
I currently have a spreadsheet with a userform that has multiple checkboxes. I want these checkboxes to change the value of cells depending on whether or not they are checked. 1 for not checked, 2 for checked. The column of the named range the cells are in is constant for each checkbox (though it is different for each checkbox and some checkboxes will need to change the value of a cell in multiple columns). The row changes depending on the value of a combobox on the userform. I have sorted out a code that works, but it seems very long, slow, and inefficient. I'm hopping someone can show me a better way to do it.
Private Sub CmbFinish_Click()
Dim rClSkills As Range
Dim rClLookup As Range
Dim var1 As Integer
Dim iDecision As Integer
Set rClSkills = Range("TblClSkills")
Set rClLookup = Range("ClassLookup")
iDecision = MsgBox("Are you sure you wish to change Skills?", vbYesNo, "Continue?")
If iDecision = vbYes Then
var1 = Application.WorksheetFunction.Match(cboClass.Value, rClLookup, 0)
If CboAppraise.Value = True Then.............................
View 6 Replies
View Related
May 8, 2009
I'm developing a workbook containing 121 sheets. Sheet 1 is effectively an index, and uses 120 form control checkboxes to unhide and display the selected sheets individually.
The code I'm using for each checkbox is below and is in a module.
View 8 Replies
View Related
Nov 20, 2013
I have a multi-worksheet workbook that has many forms control checkboxes throughout it. I'm looking for some VBA that will change the background (fill) color of ALL the checkbox when it is checked (True). I've seen code for a single checkbox, but not multiple/all boxes. I know just enough VBA to be dangerous, but I'm up to learning anything new.
View 3 Replies
View Related
Mar 2, 2014
I would like to implement a pricing tool where by if you select certain boxes the price will be increased or decreased.
For example. If chk_UtilA is selected on the attached then the target price will be multiplied by 10%.
View 6 Replies
View Related
Jan 23, 2013
i was wondering if it was possible to move database entries from sheet to sheet using a user form ? any examples for this ?
View 1 Replies
View Related
May 14, 2009
I want to create a button or a rectangle that has a macro attached. However I only want this button to show on the worksheet when for example A1 >=1.
View 8 Replies
View Related
Feb 28, 2014
My worksheet contains the following:
- Column G includes fifteen rows of a formula (beginning at G9) that returns a dynamic list of values based on criteria chosen through a dropdown box. The list can be anywhere from five to 20 values depending on the selection. When the potential matching values for the list are exhausted, the formula returns ""
- Column F includes one checkbox for each of the 20 rows containing the formula.
I need a script that will hide each checkbox that is next to a "blank" value. That is, if the cell in Column G = "", I need the corresponding checkbox to be invisible. Unfortunately, hiding the entire row is not an option. If the script could uncheck the boxes when hidden, that would be a bonus, but isn't absolutely necessary
View 4 Replies
View Related
Oct 15, 2009
I am making a form. At the top there is a dropbox with a list of applications. Based on which application the user picks, I want another section of the form to populate check boxes with the name of the projects that are associated with that application. Some applications have 2 projects, some applications have 7 projects.
View 12 Replies
View Related
Feb 6, 2012
Every thread I see on Google search for creating check boxes on a user form based on worksheet data says to use a list box, but I really want check boxes. Any code that will create, on initialize of the user form, a check box for each item in Import!B2:B (last row), regardless of the number of items? I am only worried about having about 20 max. Usually, it will only be 5 to 10.
I did try the list box, but it doesn't populate the list box.
Code:
Private Sub UserForm2_Initialize()
Dim lbtarget As MSForms.ListBox
Dim rngSource As Range
'Set reference to the range of data to be filled
[Code] ..........
View 5 Replies
View Related
Mar 28, 2012
I am currently working on spreadsheet which is using a mix of Conditional Formatting, Validation and a bit of VBA code.
The spreadsheet is a log of vacancies and applicants, When "vacancy" is selected in A I have introduced some VBA code to lock down cells S:AT on the same row.
The code is working but the issue is it is stopping you using the drop down validation throughout the sheet, if you click the arrow that appears on the cell nothing happens, However you can still access the dropdown by right clicking and choosing the 'Pick from Drop-Down List' Menu Item.
The validation is set up by ranges from another Worksheet.
The Code I am using is:
Private Sub Worksheet_SelectionChange1(ByVal Target As Range)
Dim myrow
Dim StarLock, EnLock
[Code].....
View 2 Replies
View Related
Mar 10, 2014
How to create checked and unchecked checkboxes based on three criterion(in sheet 1)?for clear explanation..it will be like this...firstly,the "SELECT TAKEN only"checkbox will checked/unchecked row d20:r20.secondly,the "SELECT RETURN only" checkbox will checked/unchecked row d21:r21 and so on.lastly,"SELECT ALL" will checked/unchecked all the rows.
Checkbox1.xlsm
View 2 Replies
View Related
Feb 11, 2010
I recently reformatted my hard drive. When I re-installed Office 2007, I was unable to run a Workbook that has a Macro in it. First, I went to Add-ins and added the Solveradd-in. When I opened the workbook, I enabled Macros. However, all I get is a maessage saying that the MVB did not compile. I know there are some things you have to do to solve this, but I cannot remember the procedure I went thru 2 years ago to get this to work. Does anyone know what steps I must take?
View 8 Replies
View Related
Nov 11, 2008
I have a worksheet that I protect from cell deletions by disabling the command function for 'delete' using the following
CommandBars.FindControl(ID:=292).Enabled = False
I execute this code in two subs:
Private Sub Worksheet_Change(ByVal Target As Range)
CommandBars.FindControl(ID:=292).Enabled = False
...
and
...
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
CommandBars.FindControl(ID:=292).Enabled = False
...
all fine and good, works great only problem is...
once disabled this function is NOT re-enabled when I leave the workbook.
When the sheet deactivates I run this:
______________________________________________________________
Private Sub Worksheet_Deactivate()
CommandBars.FindControl(ID:=292).Enabled = True
End Sub
____________________________________________________
that works fine while I am changing worksheets within the workbook.
But it doesn't do for this function to remain disabled even after I close the workbook and then it's disabled in all the other workbooks.
What I need is to have the code re-enable this function when the workbook closes or when I activate a different workbook so that the function is only disabled within the specific worksheet of the specific workbook and it remains enabled everywhere else ESPECIALLY after I close that sheet and workbook where I have it disabled!
I tried this:
______________________________________________________________
Private Sub Workbook_Deactivate()
CommandBars.FindControl(ID:=292).Enabled = True
End Sub
____________________________________________________
View 9 Replies
View Related
Feb 10, 2010
I have a workbook with that contains macros on a worksheet. When I open the worksheet, I sometimes forget to enable the macros.
Questions
1.Sometimes I get the message about macros being in the file that I'm opening and sometimes I don't - I don't understand why it doesn't pop up all the time and be consistent.
2. If I don't get the pop up screen or if I do but forget to enable the macros, I get reminded when I try to run a macro. For example, I have a check box and try to check it but I get the message that the macro has to be enabled. So I enable it, but the macro doesn't run. I have to uncheck and then recheck the box to get it to run.
View 9 Replies
View Related
Feb 17, 2007
I have a userform with, amongst other controls, a ListBox1 and a CommandButton1.
I have set the CommandButton1 to enabled = False in the properties and need it to be enabled when at least 1 item in the ListBox is selected (the ListBox is multiselect).
I have the following code, but it is not working.
Private Sub ListBox1_Click()
CommandButton1.Enabled = True
End Sub
Both controls are in the same userform and the names correct.
View 6 Replies
View Related
Mar 23, 2007
I have a shared workbook with four buttons executing different macros. Problem is that some of the users should only be able to use two of the buttons. To avoid that they accidently press the "restricted buttons" i would like a password (or keyboard shortcut) to enable these.
View 9 Replies
View Related
Jan 2, 2013
I have cells that sum the column above them.
I would like to be able to add a checkbox linked to each sum cell that adds the values of each of those cells.
Ex: A5=4, B5=6, C5=1, D5=7. With a checkbox linked to each cell, if i check the boxes in A5 and C5 then in another cell i would get the sum of those two cells= 5.
I've tried this but every time i link a checkbox to the sum cell it deletes the formula and puts in a True or False result.
Is there a way to do this?
View 3 Replies
View Related
May 22, 2009
I want to be able to change 2 cell info based on 4 checkboxes used. So based on a check box i check, it will populate what info i assigned to it the box. See below,
1 cell12342 cell
I have 4 checkboxes and 2 cells i need populated by whatver box i check. I have the following formula, but not sure how to tie in all the cells together.
=IF(A1,"Checked message",") If 1 CELL gets changed when checked, i need 2 CELL to change as well. Example, I checked box one and so 1CELL should change to, lets say to a set dollar amount like $12, and then 2CELL would also change to another entry say a set dollar amount, like $15 or whatever both based on checkbox one. BUT i also want to populate those same 2 cells with different amounts if i check the other boxes.
View 9 Replies
View Related
Feb 14, 2014
I am trying to edit the data in the actual pivots rather than editing in the data source. i know there is vba code to enable pivot table editing.
How to enable this.
View 2 Replies
View Related
Apr 21, 2009
i am trying to work out why i always have to enable macro's when i open some of my files that i have macros in, as i save them as enable macro file. I run excel 2007
as there are files i want to open without clicking on the enable button.
View 3 Replies
View Related
Feb 17, 2010
I am using the code below to open multiple workbooks in their own instance of Excel.
On my system, as well as most of the ones I've tested it on, enabling macros in the "parent" workbook, i.e. the one that contains the code, leaves them automatically enabled in the new session of Excel, as though the settings are carried over.
However, recently I've found a few systems where this is not the case. Enabling macros in the parent workbook opens the others, and then I have to enable macros again in each of the new sessions. Is there a way to fix this? All of the systems mentioned above have macro settings set to "disable with notification" and this cannot be changed.
View 6 Replies
View Related
Aug 25, 2006
if you open a workbook & choose not to enable macros, is there any way to later change your mind & set macros to enabled without having to close & reopen the workbook?
View 9 Replies
View Related
Aug 13, 2014
Checkbox.JPG
So I have an 2 ActiveX button and 2 ActiveX checkboxes. I have it set up so that the Split button will enable when both checkboxes are checked. The ClearAll button has a code/macro in it that will check the "Cleared All" checkbox when the Clearall button is pressed.
My problem is with the "Populated Data" checkbox. I want it to check/uncheck itself if there is anything in Range("A1") of a tab called "Data".
The names of these buttons/checkboxes are
"Cleared All" = ClearCheckBox
"Populated Data" = DataCheckBox
"Split" = SplitButton
View 2 Replies
View Related
Aug 4, 2007
I dont know if this can be done, but is it possible to automatically fill a column with check boxes which correspond to data in adjacent cells? I am aware of the marlett method, but Im really looking for some sort of rigid check box appearance, where the user just needs to click, and not type a, or y, etc. I have a macro which outputs a column of numbers in column A, and I would like to figure out if it is possible for a macro to automatically add check boxes in column B for all the values which show up in column A.
This is so that when the user selects some check boxes, the corresponding values in column A are then each copied to copies of a specific sheet, thus creating a multiple copies of the same worksheet for each value. This sounds like it could make a huge memory problem (from what I've read), but Im really dealing with a very small amount of data.
View 4 Replies
View Related
Apr 4, 2014
I bought a Surface 2 tablet. When I go to "settings" in the Trust Center it does not show any option to enable Active X.
View 3 Replies
View Related