Hi All
Can someone give me an explanation as to what the difference between the two variations of using the New keyword to create a new instance and using the Set. I mean Code 1 would always be better because you dont have to ever use the Set keyword
1.
2.
Are there benefits and cons to both i.e. memory allocation etc.., all answers are very welcome.
Thanks
Can someone give me an explanation as to what the difference between the two variations of using the New keyword to create a new instance and using the Set. I mean Code 1 would always be better because you dont have to ever use the Set keyword
1.
Code:
Dim wb As New Excel.Workbook
2.
Code:
Dim wb As Excel.Workbook
Set wb = New Excel.Workbook
Are there benefits and cons to both i.e. memory allocation etc.., all answers are very welcome.
Thanks