Application.Caller.Address to identify calling cell

hugh111111

New Member
Joined
Sep 11, 2014
Messages
3
I have anumber of checkboxes on my spreadsheet with OnAction property referencing thesame ‘checkbox_toggle()’ routine. In this routine I’m trying to use Application.Caller.Addressto identify the cell containing the checkbox which has been ticked but I getthe following error.<o:p></o:p>
“Object doesn’tsupport this property or method”<o:p></o:p>
<o:p> </o:p>
Here is thecode for my checkbox_toggle() routing. Please can someone tell me how toidentify the calling cell. Also I may have complicated things by changing thename property of each cell to something more memorable.<o:p></o:p>
Code:
Sub checkbox_toggle()[/COLOR][/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]    Set oShape = ActiveSheet.Shapes(Application.Caller)[/COLOR][/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]        If oShape.ControlFormat.Value = Checked Then[/COLOR][/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]            Range(oShape.Address).Interior.ColorIndex = 6
        Else
    
            Range(oShape.Address).Interior.ColorIndex = 15
        End If
End Sub[/COLOR][/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,214,944
Messages
6,122,391
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top