ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel equivalent of a "this" pointer... (https://www.excelbanter.com/excel-programming/407776-excel-equivalent-pointer.html)

Dave[_62_]

Excel equivalent of a "this" pointer...
 
I'm sure this has been posted before, but searching the group for
instances of "this" has proven to be a daunting task. :-) Do any of
you know if there is the equivalent of a "this" pointer in a VBA
class? That is, a reference to the current instance of a class?

Thanks!
Dave

Chip Pearson

Excel equivalent of a "this" pointer...
 
Use the "Me" reference. E.g.,

Me.Name = "ABC"


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)




"Dave" wrote in message
...
I'm sure this has been posted before, but searching the group for
instances of "this" has proven to be a daunting task. :-) Do any of
you know if there is the equivalent of a "this" pointer in a VBA
class? That is, a reference to the current instance of a class?

Thanks!
Dave



Bob Phillips

Excel equivalent of a "this" pointer...
 
Me refers to the worksheet class, the userform class, the ThisWorkbook
class, so may be what you want.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Dave" wrote in message
...
I'm sure this has been posted before, but searching the group for
instances of "this" has proven to be a daunting task. :-) Do any of
you know if there is the equivalent of a "this" pointer in a VBA
class? That is, a reference to the current instance of a class?

Thanks!
Dave




Howard Kaikow

Excel equivalent of a "this" pointer...
 
"Dave" wrote in message
...
I'm sure this has been posted before, but searching the group for
instances of "this" has proven to be a daunting task. :-) Do any of
you know if there is the equivalent of a "this" pointer in a VBA
class? That is, a reference to the current instance of a class?


Try Me.



Dave[_62_]

Excel equivalent of a "this" pointer...
 
On Mar 16, 10:14*am, "Howard Kaikow" wrote:
"Dave" wrote in message

...

I'm sure this has been posted before, but searching the group for
instances of "this" has proven to be a daunting task. *:-) *Do any of
you know if there is the equivalent of a "this" pointer in a VBA
class? *That is, a reference to the current instance of a class?


Try Me.


Wow! Three responses in 15 minutes. Thanks! You guys rock.


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

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