What is early binding and late binding

BizBoy

Board Regular
Joined
Jul 26, 2012
Messages
118
Hi
I am new to these concepts.
Not requesting for exact answers.
You may also help me with useful links for these two.

I know Google will help, but trying to seek help from experts here.
Also, I have another question here.
Not sure if I can merge it here only.

How does early binding or late binding affects compatibility when moving from older access version to Office 365.
Please pardon my ignorance, I am novice to access and need to work on these issues.
 
Last edited:
Hi,
Can anyone please review below code and guide me if possible.
I have copied early binding instance from the code and tried to convert it to late binding.

Could you please confirm if am doing it correct way. Thanks.

Public X__App As Excel.Application
Public x__Wb As Workbook
Public x__ws As Worksheet

Sub Test()
'Ealry binding
Set X__App =CreateObject("Excel.Application")
Set x__Wb = X__App.Workbooks.Open(XX__PATH &"Test\Test.xlsb", False, True)

'Late Binding
Dim X__App As Object
Dim x__Wb As Object
Dim x__Wb As Object

Set X__App =CreateObject("Excel.application")
Set x__Wb = X__App.Workbooks.Open(XX__PATH &"Test\Test.xlsb", False, True)
Set x__ws = x__Wb.Worksheets("Test")
End Sub
 
Last edited:
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
The late binding is correct but you would of course need to remove the early bound Public variables.
 
Upvote 0
Hi RoryA sir, yes, you are correct. These were kept just as a reference to post.
Have a nice day ahead.:)
 
Upvote 0
Hi Experts,

I have a question. If I change a code from Early Binding to Late Binding, will there be any difference in the output.
If all the input parameters are same, will early or late binding affect the output in any way.

My guess is, it should not, however I am not sure, hence seeking help.
Can anyone please help me in this.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top