C
Chris, Master of All Things Insignificant
I have come to greatly respect both Herfried & Cor's reponses and since the
two conflicted, I wanted to get some clarification.
My orginal post:
Herfried, maybe your example here can get you to answer a question I've
wondered about for a while.
With Me.Label1
.Text = ...
.Refresh()
End With
The idea behind the With clause is it allows for faster execution since
the "Me" ojbect doesn't have to be resolved 2 times in your example. But
you could rewrite your sample w/o the Me
With Label1
.Text = ...
.Refresh()
End With
In this case there wouldn't be any inhancement since you are not actually
eliminating the dot. Am I correct in my thinking?
Herfried's response
The 'Me.' is resolved even if it's not explicitly written. In this case I
used With type the code faster ;-).
Cor's Reposnse
The "Me" is only for the programmer, it does nothing at runtime.
The With clause creates an extra reference in a program. In this case it
will be slower than a program without a With clause, however think than
probably in parts of nanoseconds.
I hope this gives some ideas?
two conflicted, I wanted to get some clarification.
My orginal post:
Herfried, maybe your example here can get you to answer a question I've
wondered about for a while.
With Me.Label1
.Text = ...
.Refresh()
End With
The idea behind the With clause is it allows for faster execution since
the "Me" ojbect doesn't have to be resolved 2 times in your example. But
you could rewrite your sample w/o the Me
With Label1
.Text = ...
.Refresh()
End With
In this case there wouldn't be any inhancement since you are not actually
eliminating the dot. Am I correct in my thinking?
Herfried's response
The 'Me.' is resolved even if it's not explicitly written. In this case I
used With type the code faster ;-).
Cor's Reposnse
The "Me" is only for the programmer, it does nothing at runtime.
The With clause creates an extra reference in a program. In this case it
will be slower than a program without a With clause, however think than
probably in parts of nanoseconds.
I hope this gives some ideas?