The example u needed can be depicted as follows:
Private sub text1_change()
dim blnitemfound as boolean
dim intindex as integer
do while blnitemfound=false or intindex<list1.listcount
This is a prog in which u have a text box and a listbox..when u want to search a particular item from the list box..u have to type in the letters of the word u want to search...as soon as u enter the first letter, the entries starting with that letter will appear and so on...the change is an event of textbox control with the aid of which u cant implement results dynamically like the above example.....
please give for what u need that ?, i can't understand what u need !
May be this will do it, i used it to create a base notepad .
Dim a As Integer
Dim msgans As String
Dim filename As String
Private Sub RichTextBox1_Change()
a = 1
Private Sub SaveButton_Click()
On Error GoTo errhandler
If a = 1 Then
msgans = MsgBox("Text changed ! do you want to save your file ?", vbYesNoCancel + vbCritical, "Save File ...")
If msgans = vbYes Then
filiename = CommonDialog1.filename
RichTextBox1.SaveFile (filename & ".txt")
ElseIf msgans = vbNo Then
ElseIf msgans = vbCancel Then
a = 0
MsgBox Err.Description, vbCritical, Err.Number