View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
RBee RBee is offline
external usenet poster
 
Posts: 8
Default Application.Caller with Command Buttons?

I'm trying ot use following line of code...

ActiveSheet.Shapes(Application.Caller).TopLeftCell .Row

....to generically determine the row in which a button was clicked (which
initiates a macro). The code works great for Buttons created with the Forms
toolbar, but does not work for Command Buttons created with the Controls
Toolbox toolbar (which, I assume is ActiveX). I need to use the latter type
so I can also programatically change its BackColor.

The error seems to be Error 2023.

Any way around this?