Arnoud,
Het probleem komt voor een groot deel doordat de validatieformule niet wordt vertaald bij het ophalen in VBA (i.t.t. cel-formules)
In onderstaande code heb ik de formule vertaald.
Maar ook INDIRECT gooide, voorzover ik kon zien, roet in het eten.
Dus deze verwijdert de code ook.
Daarna lijkt een en ander te werken zoals je verwacht.
Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, _
Cancel As Boolean)
Dim str As Variant
Dim cboTemp As OLEObject
Dim ws As Worksheet
Dim rng As Range
Set ws = ActiveSheet
Set cboTemp = ws.OLEObjects("TempCombo")
On Error GoTo errHandler
'alleen cellen in kolom B krijgen een keuzelijst
If Target.Column = 2 Then
With cboTemp
'clear and hide the combo box
.ListFillRange = ""
.LinkedCell = ""
.Visible = False
End With
If Target.Validation.Type = 3 Then
'if the cell contains
'a data validation list
Cancel = True
Application.EnableEvents = False
'get the data validation formula
'vertalen van de validatie formule
str = Target.Validation.Formula1
Set rng = Me.Range("F1") 'neem hier een cel die niet wordt gebruikt in je werkblad
rng.FormulaLocal = str
str = rng.Formula
rng.Clear
'INDIRECT moeten we nog kwijt
str = Mid(str, 9)
str = Application.Evaluate(str)
With cboTemp
'show the combobox with the list
.Visible = True
.Left = Target.Left
.Top = Target.Top
.Width = Target.Width + 5
.Height = Target.Height + 5
.ListFillRange = str
.LinkedCell = Target.Address
End With
cboTemp.Activate
'open the drop down list automatically
Me.TempCombo.DropDown
End If
End If
Jan