Wednesday, September 29, 2010

Visual Basic 2010 Tutorial

It has been quite sometime I didn't post on this blog due to busy schedule, wish to apologize for that.

I have been working on building Visual Basic 2010 tutorial lately and now it is partially completed. Visual Basic 2010 is the latest version of VB launched by Microsoft this year. After 'playing' with VB2010 for a while and I found that it is powerful and easy to use. I am yet to explore its full features but what I have put up in the tutorial is enough for beginners to start programming in VB2010. You can download Visual Basic 2010 for free at the following link:


And to access my tutorial, check it out at:


This website is already ranked top 10 under Google if you search for 'Visual Basic 2010 Tutorial'

Happy learning.

Monday, April 19, 2010

New Chapter in Excel VBA Tutorial

We have created yet another chapter for our Excel VBA Tutorial. This chapter shows you how to create arrays in Excel VBA.


When we work with a single item, we only need to use one variable. However, if we have a list of items which are of similar type to deal with, we need to declare an array of variables instead of using a variable for each item. For example, if we need to enter one hundred names, instead of declaring one hundred different variables, we need to declare only one array. By definition, an array is a group of variables with the same data type and name. We differentiate each item in the array by using subscript, the index value of each item, for example name (1), name (2), name (3) .......etc.  


Click on the link below to learn more.


http://www.vbtutor.net/VBA/vba_chp21.htm

Monday, April 12, 2010

Server Problem- My apology

Dear Vbtutor Users

Our server was not functioning properly due to technical glitch committed by our hosting provider. Most of the links to the lessons cannot be accessed at the moment, please accept our sincere apology. We are confident that the issue will be resolved in a couple of hours, so please be patient and check back again later.

If you still have problem logging to our lessons tomorrow, please leave your message here.
Your feedback is important for us, thank you.

The Vbtutor Support Team

Tuesday, March 23, 2010

Search for text files in your drives and display them

Recently I received an email from a reader who ask me a VB question as follows:

' - I have a folder and file name with *.txt in C: -> C:\Test
 - I want to create a vb program to search all *.txt extension file
 - If found then just desplay it to textbox.

How can we write this code? "


Well, I have one sample program that might fit this need. This program let you choose your drives and folders and displays all the text files from the chosen folder in a list box. You need to place a combo box, a DriveListBox, a DirListbox and a Listbox into your form. The code is as follows:





Private Sub Form_Load()
Left = (Screen.Width - Width) \ 2
Top = (Screen.Height - Height) \ 2
Combo1.Text = "All Text Files"
Combo1.AddItem "All Text Files"
Combo1.AddItem "All Files"

End Sub

Private Sub Combo1_Change()
If ListIndex = 0 Then
File1.Pattern = ("*.txt")
Else
Fiel1.Pattern = ("*.*")
End If

End Sub


Private Sub Dir1_Change()
File1.Path = Dir1.Path
If Combo1.ListIndex = 0 Then
File1.Pattern = ("*.txt")
Else

File1.Pattern = ("*.*")
End If
End Sub

Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub



Private Sub File1_Click()
If Combo1.ListIndex = 0 Then
File1.Pattern = ("*.txt")

Else
File1.Pattern = ("*.*")
End If

If Right(File1.Path, 1) <> "\" Then
filenam = File1.Path + "\" + File1.FileName
Else
filenam = File1.Path + File1.FileName
End If
Text1.Text = filenam

End Sub

Monday, January 4, 2010

New Lesson! Lesson 40-Creating Reports in VB6


You have learned how to build a database in Visual Basic 6 in previous lessons, however you have not learned how to display the saved data in a report. Reports are important and useful in many respects because they provide useful and meaningful information concerning a set of data. In this new lesson, we will show you how to create a report in Visual Basic 6.


Check out this new lesson at






Friday, November 20, 2009

Visual Basic- A personal experience Part 2

 That only computer immediately became the sweetheart of everybody, and everyone can't wait to have a hand on it! And it could run BASIC! 


There was no hard disk, you need a boot diskette to start it, then you insert a 5 and a half inch floppy disk that contain the BASIC program to start the  BASIC DOS-based IDE. I can't remember what version of BASIC was it, could be GWBASIC, a dialect of BASIC developed by Microsoft from BASICA, originally for Compaq. 

Tuesday, November 10, 2009

Visual Basic- A personal experience

Do you know that computer software have been around since world war II? However, before 1975, most of the software were free, and one of the earliest computer language was BASIC. Those were the days without any PC, you have to type your programs on the punch cards and then feed them to the main frames and pick up the outputs the next day, how tedious and slow was it!


I was one of the hobbyists of BASIC back then, Bill Gates was one too! Programming back then was simple ,  the program is  sequential  and you need to type in the line numbers . However, the program can become very messy if you need to program something more complex, the line number can run to a couple of thousands, which means you have to punch a few thousand cards! 
A BASIC program typically looks like this

10   Let  X=100
20  Let Y =200
30   Z=X+Y
40 Print   Z
 One good thing about programming those days was that we get a lot of freebies! However, since Gates and his partner Paul Allen started commercializing BASIC, we no longer enjoy such benefits. But this is a good development because we learn to respect intellectual properties, and this will encourage creativity and innovations. True enough, with the advent of personal computers and commercialization of software, we get faster computers and more efficient software! We no longer have to use the punch cards and we can get the output of a program instantly, how nice!
That' enough for today, lets go programming!