So I'm studying the process of Excel Automation so I won't be such a dummy with it and notice this:
So what is the difference between these two methods and why would you choose one over the other?
Code:
Dim oXL As Excel.Application
Dim oWB As Excel.Workbook
Dim oSheet As Excel.Worksheet
Dim oRng As Excel.Range
' Start Excel and get Application object.
oXL = CreateObject("Excel.Application")
oXL.Visible = TrueCode:
Dim oXL As Excel.Application
Dim oWB As Excel.Workbook
Dim oSheet As Excel.Worksheet
Dim oRng As Excel.Range
oXL = New Excel.Application
oXL.Visible = True