What is the difference between the following two statements? I was writing a basic VB.net code which creates a new excel workbook and adds a new sheet. Both seem to be doing the same thing:
Dim oxl As Excel.Application
oxl = New Excel.Application
Dim oxl As Excel.Application
oxl = CreateObject("Excel.Application")
The only thing that I note is that the VB.net editor displays the following message when I am using NEW: "Object initialization can be simplified"
Can anyone pls help?