Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a series of checkboxes which affect conditional formatting in
other cells in each given row where the checkbox is located. The code is generic enough to use with every checkbox. I could call a subroutine from each checkboxY.click command, but is there a way to set all the checkboxes to just use the one routine? Thanks, this is driving me nuts and I don't want to have to edit EVERY single macro. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you used a checkbox from the Forms toolbar, you could assign the same macro
to each checkbox. Option Explicit Sub testme() Dim CBX As CheckBox Set CBX = ActiveSheet.CheckBoxes(Application.Caller) If CBX.Value = xlOn Then MsgBox "it's checked" Else MsgBox "Nope" End If MsgBox CBX.Name & vbLf & CBX.TopLeftCell.Address(0, 0) End Sub Rightclick on the checkbox and choose assign macro. This macro would go into a General module--not behind the worksheet like the code for checkboxes for the control toolbox toolbar version. jafsonic wrote: I have a series of checkboxes which affect conditional formatting in other cells in each given row where the checkbox is located. The code is generic enough to use with every checkbox. I could call a subroutine from each checkboxY.click command, but is there a way to set all the checkboxes to just use the one routine? Thanks, this is driving me nuts and I don't want to have to edit EVERY single macro. -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use checkboxes from the Forms toolbar, and assign them all to the same
macro, use Application.Caller to check which has been clicked. -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "jafsonic" wrote in message ups.com... I have a series of checkboxes which affect conditional formatting in other cells in each given row where the checkbox is located. The code is generic enough to use with every checkbox. I could call a subroutine from each checkboxY.click command, but is there a way to set all the checkboxes to just use the one routine? Thanks, this is driving me nuts and I don't want to have to edit EVERY single macro. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank You,
If I use a forms checkbox, will I still be able to reference the current / selected row that the checkbox is in? Bob Phillips wrote: Use checkboxes from the Forms toolbar, and assign them all to the same macro, use Application.Caller to check which has been clicked. -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "jafsonic" wrote in message ups.com... I have a series of checkboxes which affect conditional formatting in other cells in each given row where the checkbox is located. The code is generic enough to use with every checkbox. I could call a subroutine from each checkboxY.click command, but is there a way to set all the checkboxes to just use the one routine? Thanks, this is driving me nuts and I don't want to have to edit EVERY single macro. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Checkboxes, from the Forms toolbar or the Controls toolbox, do not reside on
a row, they are on a layer extra the worksheet. You could link it tom a cell, but better to just check the name IMO -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "jafsonic" wrote in message oups.com... Thank You, If I use a forms checkbox, will I still be able to reference the current / selected row that the checkbox is in? Bob Phillips wrote: Use checkboxes from the Forms toolbar, and assign them all to the same macro, use Application.Caller to check which has been clicked. -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "jafsonic" wrote in message ups.com... I have a series of checkboxes which affect conditional formatting in other cells in each given row where the checkbox is located. The code is generic enough to use with every checkbox. I could call a subroutine from each checkboxY.click command, but is there a way to set all the checkboxes to just use the one routine? Thanks, this is driving me nuts and I don't want to have to edit EVERY single macro. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
IMO?
Bob Phillips wrote: Checkboxes, from the Forms toolbar or the Controls toolbox, do not reside on a row, they are on a layer extra the worksheet. You could link it tom a cell, but better to just check the name IMO -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "jafsonic" wrote in message oups.com... Thank You, If I use a forms checkbox, will I still be able to reference the current / selected row that the checkbox is in? Bob Phillips wrote: Use checkboxes from the Forms toolbar, and assign them all to the same macro, use Application.Caller to check which has been clicked. -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "jafsonic" wrote in message ups.com... I have a series of checkboxes which affect conditional formatting in other cells in each given row where the checkbox is located. The code is generic enough to use with every checkbox. I could call a subroutine from each checkboxY.click command, but is there a way to set all the checkboxes to just use the one routine? Thanks, this is driving me nuts and I don't want to have to edit EVERY single macro. |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In my opinion.
http://www.acronymfinder.com/af-quer...=IMO&Find=Find jafsonic wrote: IMO? Bob Phillips wrote: Checkboxes, from the Forms toolbar or the Controls toolbox, do not reside on a row, they are on a layer extra the worksheet. You could link it tom a cell, but better to just check the name IMO -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "jafsonic" wrote in message oups.com... Thank You, If I use a forms checkbox, will I still be able to reference the current / selected row that the checkbox is in? Bob Phillips wrote: Use checkboxes from the Forms toolbar, and assign them all to the same macro, use Application.Caller to check which has been clicked. -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "jafsonic" wrote in message ups.com... I have a series of checkboxes which affect conditional formatting in other cells in each given row where the checkbox is located. The code is generic enough to use with every checkbox. I could call a subroutine from each checkboxY.click command, but is there a way to set all the checkboxes to just use the one routine? Thanks, this is driving me nuts and I don't want to have to edit EVERY single macro. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ASSIGN VALUE TO CHECKBOX AND CALCULATE AVERAGE? | New Users to Excel | |||
Assign a Macro | Excel Discussion (Misc queries) | |||
Assign Macro | Excel Worksheet Functions | |||
Assign Macro | Excel Discussion (Misc queries) | |||
Assign macro | Excel Programming |