Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f9553ec

Browse files
committed
Обработка ситуации, где вместо ФИО - однословный код
1 parent 9add9f1 commit f9553ec

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

‎Turniket/Turniket.bas‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'(c) Дмитрий Евдокимов, ред. 03.12.2015
1+
'(c) Дмитрий Евдокимов, ред. 26.01.2016
22

33
' Исходные данные:
44
' 1) Этот XLSM-файл с модулем Turniket.bas
@@ -305,9 +305,11 @@ End Sub
305305
Function FIO(s As String)
306306
Dim A() As String
307307
A = Split(s)
308-
If UBound(A) <> 2 Then
309-
MsgBox ("Ошибка в ФИО с парковки")
310-
Stop
308+
If UBound(A) = 2 Then
309+
FIO = A(0) & " " & Left(A(1), 1) & "." & Left(A(2), 1) & "."
310+
Else
311+
'MsgBox ("Ошибка в ФИО с парковки")
312+
'Stop
313+
FIO = s
311314
End If
312-
FIO = A(0) & " " & Left(A(1), 1) & "." & Left(A(2), 1) & "."
313-
End Function
315+
End Function

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /