When a class can have more than one instance, Me provides a way to refer to the specific instance of the class where the code is executing. Using Me is particularly useful for passing information about the currently executing instance of a class to a procedure in another module.
For example, suppose you have the following procedure in a module:
Sub ChangeFormColor(FormName As Form) FormName.BackColor = RGB(Rnd * 256, Rnd * 256, Rnd * 256) End Sub
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.