Make Two Digit, Capital First letter, Format Currencyįunction makeTwoDigit(IntVal As String ) As String If IntVal StrConv(str, vbProperCase)įunction Format_Currency(InVal As Currency ) As String Dim Total As String 'Return Sembilan Ribu Tujuh Ratus Rupiah End Sub
While (X 0) Then If (z = 2 Or z = 5 Or z = 8 Or z = 11 Or z = 14) ThenĮlseIf (z = 3 Or z = 6 Or z = 9 Or z = 12 Or z = 15) ThenĮnd Function Private Sub Command1_Click() StrPecahan = LTrim(Str(intPecahan)) + "10/100" IntPecahan = Val(Right(Mid(Angka, 15, 2), 2)) Option Explicit Private Function Terbilang(Angka As String ) As String Dim strJmlHuruf$, intPecahan As Integer, strPecahan$, Urai$, Bil1$, strTot$, Bil2$ĭim X, Y, z As Integer If Angka = "" Then Exit Function MsgBox Replace(str, "How", "Where") 'Return Where are you End Sub 'Replace(Main string, find String, Replace With) 'Replace("How are you", "How", "Where") Syntax Replace(Main string, find String, Replace With) Use LCase() function Returns replaced string with another substring. MsgBox LCase(str) 'Return how are you End Sub Use LCase() function Converts any uppercase alpha character in a string to lowercase MsgBox UCase(str) 'Return HOW ARE YOU End Sub Str = "How are you" 'H = uppercase ow are you = lowercase Use UCase() function Converts any lowercase alpha character in a string to uppercase
Str = "How are you" 'length String "How are you" = 11 Use Len() function to Return a Long containing the length of string MsgBox Mid(str, 1, 11) 'Return "How are you" End Sub MsgBox Mid(str, 1, 3) 'Return "How" '// Start 1, Length 3 MsgBox Right(str, 11) 'Return "How are you" End Sub
MsgBox Left(str, 11) 'Return "you" End Sub