【发布时间】:2016-09-21 05:11:56
【问题描述】:
我想限制用户可以输入的可接受值的范围。
例如,我只想允许 0-100,如果他们输入超过 100,那么
- 自动输入默认值(如10)和
- 创建一条弹出消息,指示已应用默认值。
这是我目前所拥有的:
Dim CO2PriceBox As Variant
CO2PriceBox = InputBox("Please Enter CO2 Allowance Price ($/ton)", "Enter CO2 Allowance Price", 0)
Range("C11").Value = CO2PriceBox
【问题讨论】: