Upgrade to the most recent Service Pack
OK, this is a silly suggestion, but I personally know a lot of developers that complain about Visual Basic’s bugs that were fixed in more recent Service Packs. This is
OK, this is a silly suggestion, but I personally know a lot of developers that complain about Visual Basic’s bugs that were fixed in more recent Service Packs. This is
Every now and then someone asks me “How can I modify the default description that is associated to an add-in I have written and that appears in the Add-In Manager?
‘ Returns the integer equal or higher than its argumentFunction Ceiling(Number As Double) As Long Ceiling = -Int(-Number)End Function
‘ Return the string of code the is selected in the code window’ that is currently active. ‘ This function can only be used inside an add-in.Function GetSelectedText(VBInstance As VBIDE.VBE)
In VB applications compiled as native code, GoSubs are 5-6 times slower than calls to regular Subs or Functions; conversely, in p-code they are considerably faster. This is one of
‘ Test whether a font name and size is supported’ Returns True if the font is supported, False otherwise” If the font is supported but the size is not, it
‘ 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