What does putting an exclamation point (!) in front of an object reference variable do in Visual Basic 6.0?
For example, I see the following in code:
!RelativePath.Value = mstrRelativePath
What does the ! mean?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is almost certainly a statement inside a With block:
which is syntax sugar for
which is syntax sugar for
where “DefaultProperty” is a property with dispid zero that’s indexed by a string. Like the Fields property of an ADO Recordset object.
Somewhat inevitable with sugar is that it produces tooth decay. This is the reason you have to use the Set keyword in VB6 and VBA. Because without it the compiler doesn’t know whether you meant to copy the object reference or the object’s default property value. Eliminated in vb.net.