VBA – Date-Time Function
VBScript Date and Time Functions help the developers to convert date and time from one format to another or to express the date or time value in the format that…
VBScript Date and Time Functions help the developers to convert date and time from one format to another or to express the date or time value in the format that…
The StrReverse function reverses the specified string. Syntax StrReverse(string) Example Add a button and add the following function. Private Sub Constant_demo_Click() msgbox("Line 1 : " & StrReverse("VBSCRIPT")) msgbox("Line 2 :…
The String function fills a string with the specified character for a specified number of times. Syntax String(number,character) Parameter Description Number − A required parameter. An integer value, which would be…
The StrComp function returns an integer value after comparing the two given strings. It can return any of the three values -1, 0, or 1 based on the input strings…
The Space function fills a string with a specific number of spaces. Syntax space(number) Parameter Description Number − A required parameter. The number of spaces that we want to add to…
The Replace function replaces a specified part of a string with a specific string, a specified number of times. Syntax Replace(string,find,replacewith[,start[,count[,compare]]]) Parameter Description String − A required parameter. The Input String…
The Len function returns the length of the given input string including the blank spaces. Syntax Len(String) Example Add a button and add the following function. Private Sub Constant_demo_Click() Dim…
The Trim function removes both the leading and the trailing blank spaces of the given input string. Syntax Trim(String) Example Add a button and add the following function. Private Sub…
The Rtrim function removes the blank spaces from the right side of the string. Syntax RTrim(String) Example Add a button and add the following function. Private Sub Constant_demo_Click() Dim var…
The Ltrim function removes the blank spaces from the left side of the string. Syntax LTrim(String) Example Add a button and add the following function. Private Sub Constant_demo_Click() Dim var…