¥»©«³Ì«á¥Ñ henry860608 ©ó 2020-8-6 00:32 ½s¿è
1.Àɮפ¤¦³4Ó¤u§@ªí¡A¤À§O¬°¤u§@ªí1~4¡A¤u§@ªí3¦³µ{¦¡½X(¨Ï¥ÎªÌ¶·¿é¤J±K½X)¡A¦ý¬O±q¤u§@ªí1¤Á´«¹L¥h¨ì¤u§@ªí3¡Aµ{¦¡½X¥ýÀˬdÅv¡A¤£¨¬«h¿é¤J±K½X¡C¦ý¬O±K½Xªºµøµ¡µLªk²£¥Í¡A¦Ó·|¨ÏÀÉ®×·í±¼¡A½Ð°Ý¦³¤èªk¸Ñ¨M¶Ü?
2.ªþ¥ó»P¥N½X¦p¤U¡C- Public Function InputBoxEr(Sht As Integer, iRow As Integer, Optional AddStr) As String
-
- Dim Prompt As String, Title As String, Default As String, HelpFile As String, Context As String, Hack As String, tmp As String
- Dim Xpos As Double, Ypos As Double
- Dim i As Integer, Count As Integer, RoleSet As Integer, LmtCnt As Integer, Delay As Integer, min As Integer, sec As Integer
- Dim StartRecTime As Date, EndtRecTime As Date, StartTime As Date, EndTime As Date
-
-
-
-
- With Sheets(Sht)
-
- Prompt = .Cells(iRow, 1)
- Title = .Cells(iRow, 2)
- Default = .Cells(iRow, 3)
- Xpos = .Cells(iRow, 4)
- Ypos = .Cells(iRow, 5)
- HelpFile = .Cells(iRow, 6)
- Context = .Cells(iRow, 7)
- Hack = .Cells(iRow, 8)
- RoleSet = .Cells(iRow, 10)
- LmtCnt = .Cells(iRow, 11)
- Delay = .Cells(iRow, 12)
- StartRecTime = .Cells(iRow, 13)
- EndtRecTime = .Cells(iRow, 14)
- StartTime = .Cells(iRow, 15)
- EndTime = .Cells(iRow, 16)
- Count = .Cells(iRow, 8)
- If RoleSet >= 0 Then
- Else
- MsgBox "¿ù»~!": Exit Function
- End If
- If (LmtCnt > 0 And Delay > 0) Or (LmtCnt = 0 And Delay = 0) Then
- Else
- MsgBox "¿ù»~!": Exit Function
- End If
- If RoleSet > Sheets(2).Cells(4, 3) Then
- MsgBox "Åv¤£¨¬": Exit Function
- ElseIf EndtRecTime > Now() Then
- min = Int((Now() - EndtRecTime) / 24 / 60): sec = Int((Now() - EndtRecTime) / 24 / 60 / 60)
- MsgBox "¤w¦b " & Delay & " ¤ÀÄÁ¤º¹Á¸Õ¾Þ§@ " & LmtCnt & " ¦¸¡A½Ð©ó" & EndtRecTime & "«á¹Á¸Õ¡A³Ñ¤U" & min & "¤À" & sec & "¬í": Exit Function
- ElseIf StartTime > Now() And Not (IsEmpty(StartTime)) Then
- MsgBox "¨t²Î¥Ø«e©|¥¼¶}©ñ¡I": Exit Function
- ElseIf EndTime < Now() And Not (IsEmpty(EndTime)) Then
- MsgBox "¨t²Î¥Ø«e¤wÃö³¬¡I": Exit Function
- Else
- .Cells(iRow, 13) = Now(): .Cells(iRow, 14) = .Cells(iRow, 13) + LmtCnt / 24 / 60
- End If
- If Count = 0 And EndtRecTime <= Now() Then
- .Cells(iRow, 17) = 1
- Else
- .Cells(iRow, 17) = .Cells(iRow, 17) + 1
- End If
- If IsEmpty(Hack) Then
- 'If Xpos = 0 Or Ypos = 0 Then
- ' InputBoxEr = InputBox(Prompt, Title, Default, , , HelpFile, Context)
- 'Else
- InputBoxEr = InputBox(Prompt, Title, Default, Xpos, Ypos, HelpFile, Context)
- 'End If
- Else
- tmp = Sheets(2).Cells(5, 3): Sheets(2).Cells(5, 3) = Hack
- 'If Xpos = 0 Or Ypos = 0 Then
- ' InputBoxEr = InputBoxDK(Prompt, Title, Default, , , HelpFile, Context)
- 'Else
- InputBoxEr = InputBoxDK(Prompt, Title, Default, Xpos, Ypos, HelpFile, Context)
- 'End If
- End If
-
- End With
- Sheets(2).Cells(5, 3) = tmp
- End Function
½Æ»s¥N½X
test(1090805).rar (18.81 KB)
|