0
我需要一种方法来使用用户窗体上的输入来确定将在输出上显示的日期。这里是我的代码:使用输入作为显示日期的基础excel vba
If StatusBox.Value <= "23:59" And ShiftCode.Value = "AA5" Then
Cells(emptyRow, 8).Value = ((Date - 1) + " " + StatusBox.Value + " " + "CEST")
Else
Cells(emptyRow, 8).Value = (Date + " " + StatusBox.Value + " " + "CEST")
End If
基本上我需要显示为Date - 1
的日期从StatusBox.Value输入小于或等于11:59 PM or 23:59
输入的StatusBox
场总是会在12小时格式。
我编辑了这个问题。我试图说,这两个输入将是12小时时间格式的数字,他们将有的范围将从00:00到23:59 – synthaxe
我已经说明了我进行编辑的原因。 – synthaxe
恢复的问题破坏行为,并投票删除重复。 – halfer