SWTB_Banner_Left_LogoOnly

Simple Write

clearpixel

HOME PRODUCT
DETAILS FREE
DEMO PRICING &
LICENSING RELATED
PRODUCTS SUPPORT ABOUT
US

SWTB_7Button_BlueLine

Simple Visual Basic Write Tutorial - Minimal Code

Simple Write FormThis example builds upon the previous simple read example to add write capabilities to the solution. As you'll see writing data points is almost as easy as reading - it only takes 1 line of code. If you'd like, you can download this program with VB6 source code.

Starting with the form we finished the simple read with, we'll add a text box to enter a value to write in and a command button as shown here.  We've set the .Caption property on the command button to say "Write Value" purely for appearances here.

Now if you double click on the Write Value button in VB, you'll get your code window - enter the code shown below inside the Command1_Click() procedure and you're done! If you look at the code below closely you'll see that one line of code does all the work - the rest is simple variable declarations and settings.

VB Code Window

Writing a ValueRun your program, type a value in the text box on the bottom of the form and click the "Write Value" button and you'll see the value appear in one of the two text boxes you setup in the simple read example.

 

 | HOME | PRODUCT DETAILS | FREE DEMO | PRICING & LICENSING | RELATED PRODUCTS | SUPPORT | ABOUT US

P: 1-888-665-3678 (US-Sales) or 704-849-2773 (Support & International), F: 704-849-6388
148A East Charles Street, Matthews, North Carolina, USA 28105
Copyright Software Toolbox, Inc., 1996-2006, All Rights Reserved Worldwide.