List Box Linked Cell loses connection

D

Dkline

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top