InstrLast – Find the last occurrence of a substring
‘ returns the last occurrence of a substring’ The syntax is similar to InStrFunction InstrLast(ByVal Start As Long, Source As String, search As String, _ Optional CompareMethod As VbCompareMethod =
‘ returns the last occurrence of a substring’ The syntax is similar to InStrFunction InstrLast(ByVal Start As Long, Source As String, search As String, _ Optional CompareMethod As VbCompareMethod =
‘ Return True if a directory exists’ (the directory name can also include a trailing backslash)Function DirExists(DirName As String) As Boolean On Error GoTo ErrorHandler ‘ test the directory attribute
‘ Return True if a file existsFunction FileExists(FileName As String) As Boolean On Error GoTo ErrorHandler ‘ get the attributes and ensure that it isn’t a directory FileExists = (GetAttr(FileName)
Referencing a static local variable in a procedure is 2-3 times slower than a regular local, dynamic variable; if you want to really speed up your procedures, convert all static
If your forms contain Label controls used to display data from a database, set their UseMnemonic property to False. In fact, if you leave this property to its default value
It seems that the only way to count the number of 1’s or 0’s in a binary value is creating a loop that iterates on all the 16 or 32
Under some circumstances, an ActiveX DLL can pass private objects to its client application, for example a reference to a control that belongs to a form in the DLL. While
When using the ParamArray keyword within a procedure, always remember that when the procedure is invoked from elsewhere in the program one of the argument might be omitted, and you
Private Declare Function ImageList_ReplaceIcon Lib “COMCTL32” (ByVal hImageList _ As Long, ByVal i As Long, ByVal hIcon As Long) As Long’ Load a set of images from a disk file