Hello All,
I'm still new to coding in the sense that i never really understood the concept of Early Binding vs Late Binding. Anyways while researching this process, it appears that my current project would need be done in Late Binding language because 1) Several people will be using the coding, 2) I don't have access to their computers to set their reference library, 3) There is probably several different versions of excel running. With that last one, I believe I'm using the earliest version that this place has so i'm assuming that others will have new versions, especially since the company is switching out computers for newer ones. Anyways I'm having issues with trying to figure out how to use late binding so i have a sub that i'm using to start the process of late binding. Can someone please help me figure out how to convert it to late bind. That way i can see what i need to do and then use it to convert the rest of the code i have. Thank you for any help.
I'm still new to coding in the sense that i never really understood the concept of Early Binding vs Late Binding. Anyways while researching this process, it appears that my current project would need be done in Late Binding language because 1) Several people will be using the coding, 2) I don't have access to their computers to set their reference library, 3) There is probably several different versions of excel running. With that last one, I believe I'm using the earliest version that this place has so i'm assuming that others will have new versions, especially since the company is switching out computers for newer ones. Anyways I'm having issues with trying to figure out how to use late binding so i have a sub that i'm using to start the process of late binding. Can someone please help me figure out how to convert it to late bind. That way i can see what i need to do and then use it to convert the rest of the code i have. Thank you for any help.
VBA Code:
Sub LSscript(rw As Long)
'Disable other sheet Events
Application.EnableEvents = False
Dim TPws As Worksheet, FMws As Worksheet
Dim lrow As Long, AGRexist As Long, C As Long
Set TPws = ThisWorkbook.Worksheets("Tract Parcels")
Set FMws = ThisWorkbook.Worksheets("Final Map")
'Find last row in NOC Log
lrow = TPws.Cells(Rows.Count, 4).End(xlUp).Row
AGRexist = FDLS(rw, lrow)
Select Case AGRexist
Case Empty, ""
lrow = lrow + 1
TPws.Cells(lrow, "B").Value = FMws.Cells(rw, "B").Value
TPws.Cells(lrow, "G").Value = FMws.Cells(rw, "C").Value
TPws.Cells(lrow, "H").Value = FMws.Cells(rw, "D").Value
TPws.Cells(lrow, "I").Value = FMws.Cells(rw, "E").Value
TPws.Cells(lrow, "D").Value = "LS AGR"
TPws.Cells(lrow, "J").Value = FMws.Cells(rw, "H").Value
If FMws.Cells(rw, "I").Value = "N/A" Then
TPws.Cells(lrow, "K").Value = "N/A"
Else
TPws.Cells(lrow, "K").Value = FMws.Cells(rw, "I").Value
End If
C = 20
Do While C < 35
TPws.Cells(lrow, C).Value = "N/A"
C = C + 1
Loop
Case Else
MsgBox ("Note an entry already exists so no new entry will be made.")
End Select
Done:
Application.EnableEvents = True
End Sub