ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   properties of excel button/checkbox (https://www.excelbanter.com/excel-programming/306069-properties-excel-button-checkbox.html)

yaniv

properties of excel button/checkbox
 
Hi all,

Using forms bar, I created a button & a check box for each row.
I wish for the the button/check box to perform a specific task via
macro on the row it is located on.
my questions a
1) How do i know what row is accosiated with a specific button/check
box?
2) The check box run the assigned macro when it's marked and also when
it is unmarked. How may I query for the status?

any help would be appreciated.

tnx,
valiky

Dave Peterson[_3_]

properties of excel button/checkbox
 
Option explicit
sub test1
dim BTN as button
set BTN = activesheet.buttons(application.caller)
msgbox btn.topleftcell.address '.row, .column
end sub

sub test2
dim CBX as checkbox
set CBX = activesheet.checkboxes(application.caller)
if cbx.value = xlon then
'checked
else
'not checked, it's xlOff
end if
msgbox cbx.topleftcell.address '.row, .column
end sub

yaniv wrote:

Hi all,

Using forms bar, I created a button & a check box for each row.
I wish for the the button/check box to perform a specific task via
macro on the row it is located on.
my questions a
1) How do i know what row is accosiated with a specific button/check
box?
2) The check box run the assigned macro when it's marked and also when
it is unmarked. How may I query for the status?

any help would be appreciated.

tnx,
valiky


--

Dave Peterson



All times are GMT +1. The time now is 05:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com