Thread: Late Binding
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Todd Huttenstine[_3_] Todd Huttenstine[_3_] is offline
external usenet poster
 
Posts: 68
Default Late Binding

In the code below, on the 2nd line of code where it says: Set oExcel =
GetObject(, "Excel.Application")
What does the "," in (, "Excel.Application") do? WHy is there a comma
there?

On Error Resume Next
Set oExcel = GetObject(, "Excel.Application")
On Error GoTo 0
If oExcel Is Nothing Then
'Excel wasn't open - open a new one
Set oExcel = GetObject("", "Excel.Application")
End If