当前位置:首页教育技巧excel技巧excel数据库

excel表格倒数怎么显示

减小字体 增大字体 2024-04-19 11:31:33


1.excel 倒数时间

Sub 倒计时() [a1].NumberFormatLocal = "h:mm:ss;@" [a1] = [a1] - 1 / 3600 / 24 '减去1秒 If [a1] < 1 / 60 / 24 Then [a1].Font.ColorIndex = 3 '小于1分钟,红色显示 Else [a1].Font.ColorIndex = 5 '否则蓝色显示 End If If [a1] > 0 Then Application.OnTime Time + TimeSerial(0, 0, 1), "sheet1.倒计时", , True '每过一秒调用本程序一次 Else [a1] = "00:00:00" End If End Sub ALT+F11,双击右边sheet1后粘贴代码。

最好建一命令按钮,单击开始运行Sheet1.倒计时。 Private Sub CommandButton1_Click() Sheet1.倒计时 End Sub。

评论评论内容只代表网友观点,与本站立场无关!

   评论摘要(共 0 条,得分 0 分,平均 0 分)

【免责声明】本站信息来自网友投稿及网络整理,内容仅供参考,如果有错误请反馈给我们及时更正,对文中内容的真实性和完整性本站不提供任何保证,不承但任何责任。
版权所有:学窍知识网 Copyright © 2011-2024 www.at317.com All Rights Reserved .