Here are some handy VB tips I've collected.
_) at the end of each line.:) is placed between statements.&) to link strings and use plus sign (+) to link numerical values.&O and hexadecimal numbers with &H. EG: 15 = &O17 = &HF.Option Explicit keywords at the start of each code module should almost be mandatory. It enables VB to check for errors on your identifiers.vbCrLf is a Standard Visual Basic Constant signifying the ANSI characters 13 and 10, i.e. Carriage Return and Line Feed. It is useful in entering a linebreak in string.DoEvents, aka "Pixie Dust", is a Visual Basic Statement that temporarily returns processor control to the operating system. It is useful to execute this statement in the middle of code that takes a long time to process. It is also good for whenever you want stuff redrawn immediately.Container property of an object to specify which container contains the control. A container, eg a Form, Frame, PictureBox, or Toolbar, can contain several controls of different types.Nothing keyword to the object variable with the Set statement when finished with the object variable and to use the Unload keyword for forms.Str() to convert a number to a string. Use Val() to convert a string to a number. Use Format() to format a string.Definition will take you to where the variable was declared or to where the procedure was written.Enum statement in the declarations section of a standard module or public class module.Type statement in the declarations section of a standard module or class module.Type statement in the declarations section of a form module.He said, "hi"..str1 = "He said, ""hi"".". (c or JS would use \".)str1 = "He said, " & Chr(34) & "hi" & Chr(34) & ".". (c would use \u0022.)Const q As String = Chr(34) str1 = "He said, " & q & "hi" & q & "."
Escape(string). Returns string where the non-alphanumeric characters are URL encoded (i.e. with the format of %hexadecimal;). This include the following characters: * + - . / @ _.Unescape(string). Returns string where the URL encoding is converted to its corresponding ASCII character. Page Modified: (Hand noted: 2007-10-03 18:15:10Z) (Auto noted: 2010-12-24 22:49:20Z)