PDA

View Full Version : What is faster/neater



OTWarrior
10-01-2010, 04:24 AM
Which of these 2 techniques would be fastest or neatest? (especially for referencing more than one object)

1) Me.txtValue

2) [txtValue]

3)
With Me
.txtValue
End With

hansup
10-01-2010, 06:27 AM
#3 should be faster than #1. However, you might need to do some elaborate timing to detect the difference.

I wouldn't use #2 ever. But I don't have a persuasive argument as to why anyone else should avoid it. Best I got is that after typing Me.txt, IntelliSense allows me to select from matching names, which guarantees I won't type in a non-existent control name.

Neater/neatest seems vague, so I don't know how to address that. "With Me" doesn't seem messy.