|
-
Jun 20th, 2001, 01:42 AM
#1
Thread Starter
Addicted Member
When to use SET keyword with NEW?
What is the correct way to use SET and NEW? When I declare a NEW ADODB.RecordSet ex. Set rs = New ADODB.Recordset I know I have to use the NEW keyword but what about when I use Dim itemX As ListItem, why don't I hae to use NEW here as well ex. Set itemX = ListView1.ListItems.Add(, , rs.Fields(0), , 1).
-
Jun 20th, 2001, 03:55 AM
#2
Fanatic Member
The difference is that when you're creating the ADODB.Recordset you are creating an entirely new class object, using a DLL that's referred to in your references section. You also have to use the New keyword when you create instances of class objects that you have in your project as Class Modules. With the ListItem, you're only creating a internal variable.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|