我正在尝试创建一个下拉列表,但是MF_E_VIDEO_RECORDING_DEVICE_INVALIDATED
一直出现在IMFCaptureEngineOnEventCallback
函数中,一直到<body>
<ui:composition template="./TemplateDefault.xhtml">
<ui:define name="content">
<h:outputStylesheet name="./css/modules.css" />
<p:dataTable var="user" value="#{user.getList()}">
<f:facet name="header">
USER LIST
</f:facet>
<p:column headerText="Id" style="width:5%">
<h:outputText value="#{user.id}" />
</p:column>
<p:column headerText="Name" style="width:20%">
<h:outputText value="#{user.name}" />
</p:column>
<p:column headerText="Password" style="width:20%">
<h:outputText value="#{user.pwd}" />
</p:column>
<p:column headerText="Email" style="width:20%">
<h:outputText value="#{user.email}" />
</p:column>
<p:column headerText="Options" style="width:15%">
<h:form>
<p:growl id="message" showDetail="true" />
<p:commandButton actionListener="#{loginFormBean.msgDelete}" update="message" icon="ui-icon-trash" title="Delete User" >
<p:confirm header="Confirm" message="Are you sure?" icon="ui-icon-alert"/>
</p:commandButton>
<p:confirmDialog global="true">
<p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
<p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
</p:confirmDialog>
</h:form>
</p:column>
<f:facet name="footer">
Found #{user.getList().size()} users.
</f:facet>
</p:dataTable>
</ui:define>
</ui:composition>
</body>
。
我尝试过:
error 1004 'Application-defined or object-defined error'
我不知道怎么了。我认为可能无法识别,但不确定。
.add
答案 0 :(得分:2)
请勿在您的.Add
中使用With Block
。
Sheets("Sheet1").Range("C2").Offset(0, 3).Select
With Selection.Validation
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$B$2:$B$5"
.IgnoreBlank = True
.InCellDropdown = True
End With
我建议避免使用.Select
并声明您的范围变量。
Dim myRng As Range
Set myRng = ThisWorkbook.Worksheets("Sheet1").Range("F2")
With myRng.Validation
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$B$2:$B$5"
.IgnoreBlank = True
.InCellDropdown = True
End With
使用.delete
确保您当前未在其中设置验证可能不是一个坏主意-如果您先前已经进行过数据验证,则可能会引发错误。
With myRng.Validation
.delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$B$2:$B$5"
.IgnoreBlank = True
.InCellDropdown = True
End With