[讨论]GetKeyWord设置默认值
<p>代码如下:</p><p> Dim strCal_Yjs As String '判断“已计算”层的值是否也参加计算<br/> Dim strlyrs As String<br/> <br/> With ThisDrawing.Utility<br/> .InitializeUserInput 1, "Yes No"<br/> strCal_Yjs = .GetKeyword(vbCr & "已计算层的值是否加入计算?[是(Y)/否(N)]:")<br/> End With<br/> <br/> Select Case strCal_Yjs<br/> Case "Yes"<br/> strlyrs = """填方标注""" & "," & """挖方标注""" & "," & """已计算"""<br/> Case "No"<br/> strlyrs = "填方标注" & "," & "挖方标注"<br/> End Select</p><p> ThisDrawing.Utility.Prompt vbCr & strlyrs</p><p>我想实现的功能是,当提示用户输入Y或N的时候,默认值设为Y,请问怎么达到这个目的。</p><p>谢谢大家的建议!</p> 顶顶 <p> Select Case strCal_Yjs<br/> Case "No"<br/> strlyrs = "填方标注" & "," & "挖方标注"</p><p> Case Else<br/> strlyrs = """填方标注""" & "," & """挖方标注""" & "," & """已计算"""<br/><br/> End Select</p><p></p>
页:
[1]