List Box Linked Cell loses connection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two list boxes. Each has a linked cell. For some reason, the linked
cell becomes "disconnected" from the list box. So as the user scolls through
the ist box, the linked cell value does not change. Sometimes it works, most
of the time it does not.

As the range varies, I fill one of the list boxes using the below code
borrowed from other responses in this newsgroup:

Sub FillListBoxCarriers()
Dim wb As Workbook
Dim ws As Worksheet
Dim strListRange As String
Dim OLEObj As OLEObject

Set wb = ThisWorkbook
Set ws = wb.Worksheets("Inputs")
ws.Select
strListRange = "AK6:AK39"

Set OLEObj = ws.OLEObjects("lbFinCarrier")
With OLEObj
.LinkedCell = ws.Range("AK5")
.ListFillRange =
ActiveSheet.Range(strListRange).Address(external:=True)
End With

Set OLEObj = Nothing
Set ws = Nothing
Set wb = Nothing
End Sub
 
Back
Top