title: Excel VBA: Listbox Error when assigning Linked Cell
body: <p>I have some cells with Data Validation. Because the dropdown list is small and hard to read, I have a button which opens a list box and populates it with the cell's Data Validation list.</p>
  
  <pre><code>Dim btnAddToList As OLEObject
  Public lboTemp As OLEObject
  
  Set btnAddToList = ws.OLEObjects("btnAddToList")
  Set lboTemp = ws.OLEObjects("TempListBoxS")
  Set Field = Selection  ' This is always cell $D$1, $D$2, or $D$3
  
         btnAddToList.Visible = False
  
        'Create a named range "temp" 
         ActiveWorkbook.Names.Add Name:="temp", RefersTo:=Field.Validation.Formula1
  
          ' open list box
          ' position list box
          ' load it with "temp"
   With lboTemp
       'show the listbox with the list
       .Visible = True
       .Left = Field.Left
       .Top = Field.Top + 50
       .ListFillRange = "temp"     
       .Object.MultiSelect = 0  ' Single select
        On Error GoTo errHandler
        prev = .LinkedCell
        If prev &lt;&gt; "" Then prev = prev &amp; ": " &amp; Range(.LinkedCell).Value  ' for debugging
        .LinkedCell = Field.Address  'SOMETIMES THIS GIVES Err 440: could not set property value, invalid property value
        .Width = Field.Width + 5
        .Height = WorksheetFunction.Min(270, .Object.ListCount * 20) 'field.Height + 5
   End With
  </code></pre>
  
  <p>As noted in the comment above, I sometimes, but not always, I get an error when the LinkedCell is supposed to be populated by with the Field.Address.</p>
  
  <p>This code is used by six different cells (D1:D3 on two different worksheets), but the error only appears to occur when one of the D1 cells is the one selected. Those cells have one other thing in common: their data validation lists, respectively, are:
    ='Category Table'!$F$2:$F$31   and 
    ='Category Table'!$F$32:$F$41</p>
  
  <p>The other four cells -- which don't get the error -- use a complicated dynamic range that references a different table on the "Category Table" sheet. (I don't really think this has anything to do with my problem, but I don't see anything else those cells have in common)</p>
  
  <p>If no one can give me an answer, I'd appreciate some advice on how to track down an intermittent problem.   </p>
  
  <p>Thanks!</p>