ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   system variable representing subroutine name? (https://www.excelbanter.com/excel-programming/271115-re-system-variable-representing-subroutine-name.html)

Bob Kilmer

system variable representing subroutine name?
 
Take alook at

http://makeashorterlink.com/?E24351335

a.k.a.,

http://groups.google.com/groups?hl=e...p03%26rnum%3D1


"Mike Cooper" wrote in message
om...
Hi,

I am trying to write code that accesses the .LinkedCell property of a
checkbox, from the checkbox_Click subroutine of the checkbox.
That is easy enough:

Sub IssueABox01_Click()
SomeVariable = IssueABox01.LinkedCell

(Where IssueABox01 is the name of my checkbox.)

Here is my challenge. I have 105 checkboxes and I would to create
uniform code so I don't have to customize that code 105 times! What I
need is some kind of default system variable that I can replace
"IssueABox01" with in the second line above; a label or variable that
represents the title of a subroutine (I can edit out the "_Click"
after that. Or else the equivalent of the "Me" form variable for a
currently selected object. I am new to VBA, but intuitively it just
seems like such a variable has to exist. I mean we're "in" the
subroutine right? So excel must "know" it's name!

Can anyone out there tell me if such a variable, and if so, what it
is. My books don't reference one, but then they are very basic.

Thank you,
Mike Cooper





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

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