Need clarification on 'set' statement Access 2007 VBA (1 Viewer)

Punice

Registered User.
Local time
Today, 04:02
Joined
May 10, 2010
Messages
135
I have seen the following 'set' statement in an example of VBA code:

'Open in the read-only mode
Set src = Workbooks.Open("strFolder_PathNew ", True, True)

I was unable to find any explanation of the significance of the two
'True, True' ending the statement.

I would like to know what all four combinations of those conditions mean, as well as where I find an article describing their usage.:D
 

Punice

Registered User.
Local time
Today, 04:02
Joined
May 10, 2010
Messages
135
Saw that before, but didn't read it thoroughly. Now, it makes sense.
Thanks a lot for doing what you do and did. ;)

I didn't see any scales; so I wrote this post instead.

After logging in the scales appeared and I picked them.
 

MarkK

bit cruncher
Local time
Today, 01:02
Joined
Mar 17, 2004
Messages
8,181
Also, the Set keyword is used to assign an instance of an object to an object variable...
Code:
Sub AssignmentExample(AnyTypeAtAll)
   Dim obj as Object
   Dim var As Variant

   If IsObject(AnyTypeAtAll) Then
      [COLOR="blue"]Set[/COLOR] obj = AnyTypeAtAll
   Else
      [COLOR="Blue"]Let[/COLOR] var = AnyTypeAtAll
   End if
End Sub
Let is assumed for simple types, but you can still use it in your code if you want.
Mark
 

Users who are viewing this thread

Top Bottom