ProjectName – The name of the current project
‘ Returns the name of the current project’ The first time it’s called it clears the error code’Function ProjectName() As String Static result As String If Len(result) = 0 Then
‘ Returns the name of the current project’ The first time it’s called it clears the error code’Function ProjectName() As String Static result As String If Len(result) = 0 Then
Use “” instead of “/” when performing divisions between Integers. The “/” operator returns a Single value, therefore the seemingly efficient line C% = A% / B% actually requires three
You can’t reliably test an auto-instancing object variable using the Is Nothing test, because as soon as you reference the variable Visual Basic silently creates an object of the given
‘ The number of 1’s in a binary number” This routine is based on the following property ‘ of binary numbers: n And (n-1) always clears the’ least significant “1”
The StartLogging and LogEvent methods of the App object only work in compiled applications. This behavior is by design and shouldn’t be considered a bug, even though it isn’t documented
If you haven’t switched to DCOM yet, and still use Remote OLE Automation, you must launch the Automation Manager program on the server machine, in order to let the server
‘ Binary search in an array of any type’ Returns the index of the matching item, or -1 if the search fails” The arrays *must* be sorted, in ascending or
Don’t use an empty For…Next loop to add pauses to your programs; instead, use the Sleep API function, that releases the CPU and lets other apps in the system effectively
If your application uses objects from external components, either third-party or your own libraries, a good rule of thumb is to include the complete servername.classname string in the Dim statement,