What is the difference between early and late binding and which is better?
Why? What to look for in your candidate’s response: Early binding is generally better since it is faster based on the type info that is compiled into the application at compile time. Late binding requires extra calls to determine object information at run time that makes it slower. Early binding affects the speed at which an object’s methods can be accessed using the object variable. A compiler will provide error checking of the object variables if they are early bound versus late bound. However, it may be desirable to declare an object variable without a type library (example: Dim oX as object) if the developer needs to be able to pass any kind of object as an argument to a procedure. When an object variable is declared “as object” it is not strongly typed and it’s binding will be late. When interviewing candidates, probe their understanding of why early binding is better, rather than accepting the answer ‘it’s better’. Early binding examples: Dim oX as excel.Spreadsheet or Dim oX as