VB Syntax (Set/Let)

VB Syntax (Set/Let)

Anonymous
Not applicable
153 Views
2 Replies
Message 1 of 3

VB Syntax (Set/Let)

Anonymous
Not applicable
Hi All,

Why are both of the following statements syntactically correct:

Set acVP = acDoc.ActiveViewport
[Let] acDoc.ActiveViewport = acVP

I would expect "Set" to be required when assigning an object to either
an object variable _or_ a property which contains an object.
0 Likes
154 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
I think it has to do with the fact that the property, even though it contains an object, isn't actually an object itself but does the object assignment internally within the property.

So in essence you are really just passing a parameter to the property Let statement, which internally does the object assignment.

Anyway thats how it seems to me, I could be wrong.

Micah
0 Likes
Message 3 of 3

Anonymous
Not applicable
On Thu, 20 Apr 2000 18:51:50 +0000, mnerren
wrote:

»I think it has to do with the fact that the property, even though it contains
»an object, isn't actually an object itself but does the object assignment
»internally within the property.
»
»So in essence you are really just passing a parameter to the property Let
»statement, which internally does the object assignment.
»
»Anyway thats how it seems to me, I could be wrong.

Hi Micah,

That sure looks like what's going on. Some sort of hidden default
property of the AcadViewport object, maybe? Strange way to do things
but I guess it makes sense to someone.

Thanks
0 Likes