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 0babb36

Browse files
committed
Turniket.bas edited online with Bitbucket
1 parent 12e749f commit 0babb36

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

‎Turniket/Turniket.bas‎

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
'(c) Дмитрий Евдокимов, ред. 09.09.2015
1+
Attribute VB_Name = "Turniket"
2+
'(c) Дмитрий Евдокимов, ред. 10.11.2015
23

34
' Исходные данные:
45
' 1) Этот XLSM-файл с модулем Turniket.bas
@@ -302,12 +303,16 @@ Sub TurnOver()
302303
Application.StatusBar = False
303304
End Sub
304305

305-
Function FIO(S As String)
306-
Dim A() As String
307-
A = Split(S)
308-
If UBound(A) <> 2 Then
309-
MsgBox ("Ошибка в ФИО с парковки")
310-
Stop
311-
End If
312-
FIO = A(0) & " " & Left(A(1), 1) & "." & Left(A(2), 1) & "."
306+
Function FIO(s As String)
307+
Dim A() As String, items As Integer
308+
A = Split(s)
309+
items = UBound(A) + 1
310+
Select Case items
311+
Case 3: FIO = A(0) & " " & Left(A(1), 1) & "." & Left(A(2), 1) & "."
312+
Case 2: FIO = A(0) & " " & A(1)
313+
Case 1: FIO = s
314+
Case Else
315+
'MsgBox ("Ошибка в ФИО с парковки")
316+
'Stop
317+
End Select
313318
End Function

0 commit comments

Comments
(0)

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