What is ME

N

nujcharee

Hi Guys
I am a dummy for VBA programming. I notice a lot of codes in VBA using
"ME" reference. For example the code below. What doe ME refer to?

Private Sub HeatPoints_BeforeUpdate(Cancel As Integer)
If (Me.HeatPlace.Value = "1") Then
Me.HeatPoints.Value = "5"
Else
If (Me.HeatPlace.Value = "2") Then
Me.HeatPoints.Value = "4"
Else
If (Me.HeatPlace.Value = "3") Then
Me.HeatPoints.Value = "3"
Else
If (Me.HeatPlace.Value = "4") Then
Me.HeatPoints.Value = "2"
Else
If (Me.HeatPlace.Value = "5") Then
Me.HeatPoints.Value = "1"
Else
If (Me.HeatPlace.Value > "5") Then
Me.HeatPoints.Value = "0"
Else
If (Me.HeatPlace.Value = "DNF") Then
Me.HeatPoints.Value = "0"
Else
If (Me.HeatPlace.Value = "DNS") Then
Me.HeatPoints.Value = "0"
End If

Many thanks
Peddie
 
J

Jonathan West

Hi Guys
I am a dummy for VBA programming. I notice a lot of codes in VBA using
"ME" reference. For example the code below. What doe ME refer to?

Me refers to the current instance of the class or userform within which the
code resides.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top