Binding
DESCRIPTION:
The difference between EARLY Binding and LATE Binding.
EARLY Binding
1. New requires that a type library is reference (Microsoft Internet Control Reference Library)
2. IntelliSense available
LATE Binding
1. CreateObject uses the registry. No reference needed
2. No IntelliSense available
Early/Late Binding
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | Sub Early_VS_Late_Binding() Call EARLY_Binding(“www.YAHOO.com”) Call LATE_Binding(“www.GOOGLE.com”) End Sub '—————————————————————– Sub EARLY_Binding(Website As String) Dim ObjIE As InternetExplorer Set ObjIE = New InternetExplorer ObjIE.Navigate (Website) If ObjIE.Busy Or ObjIE.ReadyState <> READYSTATE_COMPLETE Then DoEvents End If ObjIE.Visible = True End Sub '—————————————————————– Sub LATE_Binding(Website As String) Dim ObjIE As Object Set ObjIE = CreateObject(“InternetExplorer.Application”) ObjIE.Navigate (Website) If ObjIE.Busy Or ObjIE.ReadyState <> READYSTATE_COMPLETE Then DoEvents End If ObjIE.Visible = True End Sub |
Ratings:
