|
本帖最后由 wo418200627 于 2023-1-9 23:56 编辑
- Sub 晚自习()
- Application.ScreenUpdating = False
- Dim wkb As Workbook
- [ag1].Value = "晚自习"
- If Len(Dir("D:\Documents\为伊消得人憔悴\BaiduSyncdisk\2023上半年(22-23高一4班下学期)\高一(4)班网课\网课统计" & Sheet6.[ae1].Value & ".xls")) = 0 Then
- m = InputBox("请输入本节晚自习安排:", "提示", "做试卷做练习做作业")
- n = InputBox("请输入本节晚自习日期和科目:" & Chr(13) & "(按下面给的格式填写)", "提示", "1.9晚自习——数学")
- o = InputBox("请输入本节晚自习详细时间:" & Chr(13) & "(按下面给的格式填写)", "提示", "2023-01-08 16:36")
- Sheet7.[aa3] = m
- Sheet7.[ab1] = n
- Sheet7.[z3] = 0
- Exit Sub
- End If
- Set wkb = Workbooks.Open(Filename:="D:\Documents\为伊消得人憔悴\BaiduSyncdisk\2023上半年(22-23高一4班下学期)\高一(4)班网课\网课统计" & Sheet6.[ae1].Value & ".xls")
- Windows("统计报表(草稿).xlsm").Activate
- With wkb.Worksheets(1)
- Sheet7.[ab1] = .[b8].Value
- Sheet7.[z3] = .[a8].Value
- Sheet7.[aa3] = .[d8].Value
- Sheet7.[ab3] = .[l15].Value & .[l16].Value & .[l17].Value
- Sheet7.[y5:y204] = .[e16:e215].Value
- Sheet7.[z5:z204] = .[i16:i215].Value
- Sheet7.[aa5:aa204] = .[j16:j215].Value
- Sheet7.[ab5:ab204] = .[l16:l215].Value
- End With
- wkb.Close
- Application.ScreenUpdating = True
- End Sub
复制代码 然后,在输入详细时间那里,按方框中预先提示的输入时间后,结果成了这样子
,怎么让它变成2023-01-08 16:36 这样的格式 |
|