Custom Checkbox Control In Excel
Mar 6, 2006
I have a user who is asking if it is possible to create a custom checkbox control for use inside of Excel. This new checkbox control is essentially a checkbox control that has other graphics around the checkmark other than a square.
For instance, he need to have a triangle that has a clickable checkmark inside it. He needs a circle with a clickable checkmark inside as well as a couple of other shapes that have a clickable checkmark inside (no square around the checkbox). I've tried to put a regular checkbox on top of a graphic but you have to deal with the square corners of the checkbox even if it's set to transparent.
Any code or otherwise on how to create a custom or add-in that would do what I describe?
View 6 Replies
ADVERTISEMENT
Sep 14, 2012
I am trying to use a checkbox to control the custom views that i have set ("Normal", "Hide") However after i entered it in VBA, it just does not work. After i check or uncheck the checkbox, it just keep going back to the "Normal" view.
Sub CheckBox1_Click()
If CheckBox1 = True Then
ActiveWorkbook.CustomViews("Hide").Show
Else
ActiveWorkbook.CustomViews("Normal").Show
End If
End Sub
View 5 Replies
View Related
Nov 22, 2013
I have an Excel 2010 workbook with many worksheets using hundreds of Form Control (not ActiveX) checkboxes. I need a bit of VBA to change Checkbox background color of each checkbox whenever the user checks the box. I assume this needs to be a click event? I don't even know the Checkbox property name I need to change I'm learning VBA as quick as I can
View 4 Replies
View Related
Apr 16, 2009
Not sure if this can be done, when I enter data for a journal only the data with the box checked is entered? I hope my example shows what I mean.
View 9 Replies
View Related
Jan 9, 2012
I am trying to create a workbook where the first worksheet has a list of Checkboxes and each checkbox 'unhides' or 'hides' subsequent worksheets within the workbook, depending on whether the box is checked. I can make the checkbox, I can record the macro.
Sub Test_checkbox()
' Test_checkbox Macro
Sheets("Dist").Visible = True
End Sub
How do I link them together? Ideally, I'd like to have my boss be able to 'play' with which sheets are visible (check, uncheck, check, uncheck, etc) .
View 4 Replies
View Related
May 30, 2013
I have many Form Control Check Boxes that all link to another sheet on row 3.
I have many changes to make but only want to implement the change related to the check box.
This code works perfect when you manualy type true or false on row 3 but not if the check box makes the change.
Private Sub Worksheet_Change(ByVal Target As Range)
ThisCol = Target.Column
If Target.Row = 3 Then
RESULT = MsgBox(Cells(1, ThisCol) & " = " & Cells(3, ThisCol), vbOKOnly, "CLICK RESULTS")
End If
End Sub
Why does this not work when a check box changes the value in row 3?
View 5 Replies
View Related
Jan 26, 2007
I have several checkboxs in an excel sheet, that if one is checked i would like it to make a change to a variable in a macro that will run when saving a file.
for an example:
if checked:
Checkbox1 = NCE1
Checkbox2 = NCE2
Checkbox3 = NCE3
Checkbox4 = NCE4
Checkbox5 = NCE5
I have a bit of code that is like this....
ActiveWorkbook.SaveAs ("\marketing2PartageNonconforms" & sF1 & " - CO" & sF2 & " - FC" & sF3 & ".xls")
I would like sF1 to change depending on which checkbox is checked. so if checkbox1 is checked, than sF1 = NCE1 .
View 9 Replies
View Related
Aug 7, 2006
I am an average user of excel and i am wanting some help with macros. I can record macros, that i do understand. Its the part where you can assign the macros to the Checkbox i have created.
The effect i am trying to create is that when the checkbox has a tick in it, certain properties happen to a cell. But when the checkbox has no tick in it something else happens to the cell. I have recorded 2 macros for what i want to happen its just getting it associated with the true/false of the checkbox.
I have no Visual Basic Experience and i have tried reading other posts, but the code just goes right over my head at the moment. Thanks in advance for anyhelp. I can attach the spreadsheet etc...
View 9 Replies
View Related
Sep 22, 2006
I am creating a main worksheet (Legend) in which information will be entered and then populate to other areas (worksheets) within the workbook. I would like to create a print macro - that will run and print all the worksheets that we have selected on the "legend" page. These worksheets would have been selected by ticking a check box.
My question is how to associate a check box to a worksheet? For example - the second worksheet is named " Schedule A" 3rd "Schedule B" and so on.
- The check boxes will be name schedule A, Schedule B and so on.
- I would like to associate (link) the checkbox Schedule A with the Worksheet of the same name. Then when this checkbox is selected, and the print macro runs it will print the worksheets that are selected.
View 5 Replies
View Related
Aug 27, 2012
I have coming from the Forms Controls within a Sheet 6 CheckBox.
for the following countries: "Spain", "France", "UK", "Italy", "Germany" and "EUROPE"
when Europe is selected the I select all the Check Boxes at once by Macro, if Europe is selected and I unselect Europe, then I unselect all the countries by Macro.
When Europe is selected and then I press for eg in Spain, the Spain is not selected and then I unselect Europe, by macro.
This works fine, and my macro does the job OK.
Code:
Sub mCountries()
On Error Resume Next: Application.ScreenUpdating = False
Dim wCaller As String: wCaller = Application.Caller
Dim aCheckBoxes(): aCheckBoxes = Array("cBoxSpain", "cBoxFrance", "cBoxItaly", "cBoxGermany", "cBoxUK")
Dim X As Long: X = -4146
Dim Y As Long
[Code]....
But if My 6 CheckBoxes are grouped... the Macro does do the job How can I refer to a shpes withing the Grouped Shape to apply the selection and/or to unselect??
View 4 Replies
View Related
Mar 29, 2007
I'm building a userform excel application and am using the MS date/time picker control. I've run into the familiar "computer doesn't have OCX" problem and want to avoid using a custom OCX.
I was thinking of just making my own control instead. Has anyone made one in VBA? I found some VB examples which I could port over, but they use a lot of api calls. For reliability, I'd like to keep this as simple as possible though.
View 9 Replies
View Related
Jun 18, 2014
I'm creating a custom function to cut down on redundant code. However, in converting the code to a function so that it may be used in different instances, I'm getting an unexpected error when the code executes.
The error is:
Code:
Object doesn't support this property or method.
Here is my function:
Code:
Public Function chkClick(checkboxName As String, tabName As String, chartName As String, seriesNumber As Long)
Sheets(tabName).ChartObjects(chartName).Activate
If Sheets(tabName).checkboxName.Value = True Then
ActiveChart.FullSeriesCollection(seriesNumber).Select
[code]....
The function checks the status of the checkbox name passed to it. If it's checked, it will show a chart series. If it's not checked, it will hide the chart series. The error comes in referencing the "checkboxName".
How might I need to alter the code so that I can use the form control name as a variable? This is ultimately one of the key components of the function as each control has it's own name.
View 9 Replies
View Related
Jun 23, 2005
I am using the following code to create an Excel toolbar custom control Button. What would be the VBA code to change the color of the image I have chosen? ....
View 6 Replies
View Related
Sep 1, 2007
I want to add a control under Chart on the menu bar. This line of code errors with "Invalid Procedure Call or Argument"
With Application. CommandBars("Worksheet menu bar").Controls("Chart")
Change "Chart" to "File" or "Edit" or "Tools" and it's fine.
The Chart item only appears when a chart is selected, but it errors even when a chart on the worksheet is selected.
View 7 Replies
View Related
Apr 11, 2014
I am trying to increase the checkbox size in Excel.. I have tried everything from increasing height and width of cell as well as using the format checkbox feature..
View 1 Replies
View Related
Feb 25, 2009
married, widows, single checkbox is selected
macro solution
good work.
View 5 Replies
View Related
Dec 7, 2011
I'm trying to get a checkbox in a user form to prepopulate depending on what's in cell H5.
Here is the line of code that I need rewriting (in bold):
Sub Userform_Initialize()
LabelPolicyNumber.Caption = ActiveSheet.Range("B5").Text
LabelSponsorName.Caption = ActiveSheet.Range("D5").Text
If Application.WorksheetFunction.IsNA(ActiveSheet.Range("H5")) = True Or ActiveSheet.Range("H5") = "" Then CheckBoxHalifax.Value = False Else CheckBoxHalifax.Value = True
End Sub
H5 contains a vlookup formula, so depending on other variables it can either have a value ("Halifax"), an error (#NA) or be blank. I've
It seems Excel will only evaluate the first statement and ignore the Or statement, meaning when H5 is blank Halifax is checked off when I load the user form.
I'm working in Excel 2007 on Windows XP.
View 6 Replies
View Related
Jan 30, 2013
How do you changethe font size in acheckbox in excel 2010?
View 1 Replies
View Related
Jun 7, 2012
One of my engaging tasks at work is to disable/enable general ledger accounts (accounting speak) in our Oracle ERP application using one of their forms.
In this case it would be a list of gl accounts and to the left of the gl account would be a check box that I can click.
Checked means enabled.
Blank would mean disabled.
If I have a list of currently enabled gl accounts that are to be disabled (unchecked) then I have to do so one by one. I can click with the mouse on the checkbox or I can using the keyboard use the space bar followed by the down arrow key and repeat. As fun as that sounds sometimes I'm faced with dozens or hundreds at a time.
Therefore my question is can I automate this using VBA? or any other tools out there.
Using Excel Office 2007, Oracle ERP (9.5.8) I think - it's old
View 1 Replies
View Related
Jan 28, 2013
How can i hide and unhide column and rows using checkbox in the excel.
detail price qty amount
chair 1000 1 1000
some time i just want to see only the amount or some time i want to see the qty, how can i hide and unhide row or Column
View 1 Replies
View Related
Feb 1, 2013
I am copying a large table of data from a report generated in Firefox and pasting it into Excel 2010. The data has several columns of html checkboxes. I need to do two things with the checkboxes and would like to do a third:
1: Count how many checkboxes are ticked in each of the columns.
2: Compare a column A of checkboxes to a column B containing numbers, and then both count and highlight any row where the checkbox is ticked but column B is a 0.
3: (optional) I would like to erase the html checkboxes and, if the box was checked, replace it with a regular x in the underlying cell.
I found some code on another forum that generates a list of values for each checkbox (vba - Obtain the value of an HTML Checkbox inserted in Excel worksheet - Stack Overflow).
Based on that, I recorded a macro to extract the html Name of a single checkbox and then set up a Vlookup for the True/False value. However, I can't figure out how to automate a vlookup for every individual checkbox and put the data in the appropriate underlying cell.
View 3 Replies
View Related
Jun 22, 2014
I need a VBA code that will when used with a Form Control "Check Box" will unhide / hide a row. To be more exact, I'm needind the code to "Hide" row 34 when unchecked and "Unhide" the same row when checked. I'm using Excel 2010.
View 9 Replies
View Related
Apr 16, 2014
I have 3 checkboxes; when one is checked, a set/range of rows should be visible. Only 1 checkbox should be checked at a time.
If checkbox 18 is already checked, and checkbox 20 is then checked, I want the first checkbox unchecked and the rows for checkbox hidden.
I'm using the following code. It works great as long as I check and uncheck the same box before attempting to check another box. But if Checkbox18 is already checked with its rows showing, and I then check checkbox20, the checkbox20 sub runs and as I step through, it jumps to sub checkbox18.
How can I stop my subs from jumping from one to another?
Code:
Private Sub CheckBox18_Click()
If CheckBox18.Value = True Then
Worksheets("TRF").Rows("36:41").Hidden = False
Worksheets("TRF").Rows("42:64").Hidden = True
Worksheets("TRF").Rows("65:76").Hidden = True
CheckBox19.Value = False
[Code] .........
View 9 Replies
View Related
Jul 29, 2014
I am looking to insert a drop down box in Excel 2010 which will allow users to select multiple items. At the moment I have data validation drop down lists in other columns, however I need one column to allow for multiple selections.
Basically I have a drop down which allows for a region to be selected, my next drop down (in the next column) I need to allow users to either select "ALL", or multiple countries which fall within the region selected previously. I need a check box so that users can select multiple countries, and deselect if an incorrect country is selected in error.
View 1 Replies
View Related
Jul 30, 2014
I have a sheet in excel 2013
In column "Y" I want to add a checkBoxs activeX from cell 6 until cell 500
I don't want to repeat it 500 times )":
This is my code for a single checkBox
[Code] ...........
View 9 Replies
View Related
Nov 30, 2012
I'm using Excel 2007.
I'm building a spreadsheet which includes a few columns which have activex check boxes which are linked to cells. I want to allow the users of the spreadsheet to insert new rows if necessary. Ideally, when these new rows are inserted, the check boxes would also automatically appear in the corresponding columns of the new row (and be linked to the relevant cells), just the same way that pull-down menus and formulas automatically copy into the new row. Is there a way to do this?
View 1 Replies
View Related
Mar 18, 2014
I currently have the following Macro for one of my many checkboxes in 2007 Excel:
[Code] .....
It works perfectly until additional rows are added/deleted before the indicated rows in the code (It changes the number sequence in the workbook). The number sequence stays the same in the code which means I am now hiding rows either before (delete rows) or after (insert rows) the intended rows I want to be hidden. Is there a way to change the above code to remain with the assigned rows regardless of the adding/deleting of rows before it?
View 1 Replies
View Related
Sep 21, 2009
I'm writing a spreadsheet which performs automatic reporting in Word at the moment and, having done this once before I thought it would be simple... Unfortunately however I seem to have run into the following problem:
I'm trying to have Excel paste in a table, then move down one line, enter a page break and then repeat for all of the tables it needs to paste.
Among a rather large sub which I re-used from another project is this bit of code which is relevant to this part:
Dim AppExcel As Window
Set AppExcel = ActiveWindow
Set appwd = CreateObject("Word.Application")
appwd.Visible = True
Set appwd = CreateObject("Word.Application")
appwd.Visible = True
appwd.Documents.Open Filename:=FileToOpen
'select test bookmark
appwd.activedocument.Bookmarks("test123").Select
The key bit is this segment, which is the part repeated for each table (it all works up to here)
For K = ActionFrom To ActionTo
Cells(3, 2) = K
Call SelectNode
LR = Sheets("Data_Entry").Cells(Rows.Count, "B").End(xlUp).Row
Worksheets("Data_Entry").Range("B7:I" & LR).Select
Selection.Copy
With appwd
.Selection.Paste
.Selection.MoveDown Unit:=wdLine, Count:=1
.Selection.InsertBreak Type:=wdPageBreak
End With
Next K
The two bits in red are what I am trying to now do, but Word keeps returning the error 'bad parameter'. I've tried doing it both in and out of the 'with' function and I can't seem to make it work...
View 9 Replies
View Related
Dec 14, 2008
How can i hide and unhide one checkbox using another one? Can it be done using IF formula?
And also i am using this checkbox to function something else as TRUE/FALSE.
View 6 Replies
View Related
Jan 10, 2014
I'm creating a basic form or templateusing Excel 2010 where the user will fill out information (See attached screenshot) I'd like to incorporate two a check boxes, that when ticked, change the display of the second table, either adding, removing or splitting of of the current columns in to two?
Is this, or any variation of, possible using Excel 2010.
View 2 Replies
View Related