Get Balance Of String : Useful Function
Get Balance Of String : Useful Function
API Declarations
Rem Developed By Buddhika Fernando
Rem Comments [email protected]
Rem Sri Lanka - Vanik Information Technologies (Pvt) Ltd. Programmer
Rate Get Balance Of String : Useful Function
(1(1 Vote))
ByVal PassTextLen As Integer, _
ByVal StatValue As Integer, _
ByVal FillString As String, Optional SetToLeft As Boolean = False) As String
Dim Balance As Integer
If PassText = "" Then Exit Function
If PassTextLen = 0 Then Exit Function
If StatValue = 0 Then Exit Function
If FillString = "" Then Exit Function
Balance = StatValue - PassTextLen
If Balance <= 0 Then
GetBalance = PassText
Else
If SetToLeft = False Then
GetBalance = String(Balance, FillString) & PassText
Else
GetBalance = PassText & String(Balance, FillString)
End If
End If
End Function
Private Sub Form_Load()
Me.Caption = GetBalance("Buddhika Fernando", Len("Buddhika Fernando"), 30, "#", True)
End Sub
Get Balance Of String : Useful Function Comments
No comments yet — be the first to post one!
Post a Comment