Visual Basic Code Snippets

Copy the declarations and code below and paste directly into your VB project.

03 October, 2013   

Basic commands for reading a text file one line at a time.

Adding VBA Code Programmatically in Excel

22 April, 2013   

Code for adding and positioning multiple charts in a worksheet

04 February, 2013   

This removes every instance of a space in the given string returning the new string as a string for Visual Basic

04 February, 2013   

Visual Basic code to check if value is decimal.

16 January, 2013   

Example for adding items into combo by using Win32 API. Written by Nir Sofer

03 January, 2013   

Choose a color scheme as found in the Display control panel applet

03 January, 2013   

For this code 2 command buttons and 1 text box required

10 November, 2012   

It will return a string of words to represent the integer part of this value.

10 November, 2012   

Visual Basic code example for creating a Global Hotkey (active throughout Windows)

Example code for moves cursor to the start of the selection (variations):

01 November, 2012   

Example code for mMoving cursor to end of paragraph

22 October, 2012   

Visual Basic sample source code to display all drives

22 October, 2012   

The following code snippet shows you how to create an alternative DoEvents function by using Win32 API calls. Be aware that accelerator keys won't work properly with this alternative function.

Visual Basic code for inverting text with simple code. Very easy for all beginners. Easy to understand. Compatibility: VB 6 Author of the code: Ben - Ezrah Mansilla Declarations: Add two text box with default name One command with default name

Visual Basic code to convert number to Indian Rupees. This code is compatible with : VB 6,VB 5,VB 4/32,VB 4/16,VB 3 Author of the code : Anandh Kumar. B Declarations : Usages Msgbox CRupees(123456.78)

This technical tip shows how to read the image and mark all the barcode regions, for all the recognized barcodes in the image. The barcode region is the part of the image that only contains the barcode itself. In a large image, it is possible that there are other texts or images along with the barcode. Getting the barcode region will separate...

Visual Basic Source Code to Get Active window caption and work on active window. Author: Kailash Chandra Vaishnav

31 October, 2011   

It is a class file which can export to excel. simply call the function and give sql Query and sql connection.