我有一个公式,我试图在一个范围内绘图 - 通过Print.Debug我可以看到我的公式有意义,但是Range不会计算,但会引发错误标题。
在Print.Debug中我可以看到str is =
=OFFSET(Menu!A:A,(3+COUNTIF(Menu!F:F,"Drikke")+COUNTIF(Menu!F:F,"Ernæring")-1),0,COUNTIF(Menu!F:F,"Mad"),1)
我的代码行如下:
With cboTemp
'show the combobox with the list
.Visible = True
.Left = Target.Left
.Top = Target.Top
.Width = Target.Width + 5
.Height = Target.Height + 5
Problem is, that I'm taking the formula from a datavalidated, and it's not parsing correctly. I'm using: .ListFillRange = Target.Validation.Formula1 , but the range of the datavalidation is not shown, and I know from the original cell, that the formula is valid <---- Line that throws error
.LinkedCell = Target.Address
End With
为什么会抛出错误?
修改
我尝试从数据验证单元格中获取公式(str),使用:
.ListFillRange = Target.Validation.Formula1
,但未显示数据验证的范围,我从原始单元格知道公式有效
我现在没有收到错误,但也没有显示范围 - 我怀疑这与&#34; IgnoreBlankCells&#34;属性?