View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Late Binding or Late Anything

I don't know all there is on the subject, but

late binding requires the computer to determine what specific data type (and
properties/methods for that data type) you are using at run time, instead of
when the code is compiled.

You could declare a variable as an object, then associate it with a range
(late binding). Or, declare the variable as a range (early binding) in your
Dim statement.

As an example of late binding, you could declare a variable as an object,
then in your code set it equal to the Word Application.

Alternatively, w/early binding you would set up a reference to Word through
VBA's Tools/References menu, then declare your object variable as the Word
Application in your Dim statement. One advantage is this enables Excel's
Intellisense when you try to use Word methods and properties in your VBA code.

If I remember correctly, one possible advantage to late binding is you could
check for the presence of Word Application before associating the object
variable w/Word (or trap the error when you try to bind the object variable).
With early binding, I believe you would get a compile error before you could
try to trap the error.




"Piranha" wrote:


Hi,

The phrase "Late Binding". I also heard something about "Late" in
reference to a formula.

What does it mean?
How do you use it?
Why would you use it?
When would you use it?

Explaination or a reference to a place where i can get info about this
would be much appreciated.

thx
Call me Late for anything but dinner.
Dave


--
Piranha
------------------------------------------------------------------------
Piranha's Profile: http://www.excelforum.com/member.php...o&userid=20435
View this thread: http://www.excelforum.com/showthread...hreadid=476077