Wednesday, November 4, 2015

Functions


11/4/2015:

4 Types of functions;


  1. String Functions
  2. Inbuilt Functions
  3. MsgBox 
  4. InputBox

String Functions:
  • StrReverse -- helps to reverse the string completely
  • & -- concatenate string
  • Replace -- -Used to replace characters in a string
  • Len --- Length of string
  • Left --- Used to return specified number of characters from the left side of the string
  • Right ... Used to return specified number of characters from the right side of the String
  • Mid ... Returns the String of given numbers from a specified location in another String
  • InStr .... Determines whether a character or string exist within another string
  • Split ... Takes a list of words stored in a String and split them into a String array
  • Filter ... Helps to create a new list that is a filtered version of the first list
  • Join ... Combines all the elements in String Array
  • UCase and LCase...converts the string to upper and lower case
Inbuilt functions:

  • Convert one data type to another
  • Validation functions ---- IsEmpty(), IsError(), IsDate()....
MsgBox:

  • MsgBox consists of one command button to acknowledge the message
  • Icons and multiple buttons also could exist
vbCritical, vbExclamation, vbQuestion, vbInformation.....helps in displaying various icons in the msg box.

  • The six set of command buttons can be used --- vbOKOnly, vbOKCancel. vbYesNoCancel....
  • We can retrieve value from MsgBox

No comments:

Post a Comment