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></o>
“Object doesn’tsupport this property or method”<o></o>
<o> </o>
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></o>
“Object doesn’tsupport this property or method”<o></o>
<o> </o>
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></o>
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]