【发布时间】:2016-04-29 04:42:56
【问题描述】:
我正在制作一个工作表,该工作表允许用户在预先记录的数据的两个时间值之间过滤数据。 The time format on this data goes down to the tenth of a second (HH:MM:SS.0) and while the combobox list will display all of these values, when one is selected, it is truncated to just the second value.我做了一些查找,发现了很多关于当前时间调用时间到毫秒的信息,但不仅仅是格式化显示。以下是我的组合框代码当前的读取方式:
Private Sub ComboBox21_Change()
With ComboBox21
.Value = Format(.Value, "hh:mm:ss")
End With
End Sub
我尝试了几个不同的选项,包括在末尾添加“.0”,但没有成功。另外,我注意到进行选择时链接单元格中的值似乎反映了选择本身的内容。我的印象是链接单元格会显示选择的相对数量与可用选择的总数,这就是我真正需要的。有谁知道如何解决这一问题?
【问题讨论】:
-
看起来不错的答案是here - Display Milliseconds In Excel
-
@ScottHoltzman 将其放在即时窗口中:
? format (timeserial(11,24,45.5642),"hh:mm:ss.000")它仍将数字四舍五入并将.000放在末尾。