• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Search Box Error

Juzar22

Member
Greetings to All,

I have an excle file when i click in search button search box opens and when i enter text in search box it gives me error "compile error:" i am attaching herewith excel file and error screen shot , can someone help me to correct the code, Thanks
 

Attachments

  • File.xls
    99.5 KB · Views: 7
  • Search.JPG
    Search.JPG
    116.8 KB · Views: 8
  • Error.JPG
    Error.JPG
    327.2 KB · Views: 8
I now have a working version but enabled by trial and error rather than any profound knowledge!
Code:
Private Sub TextBox1_Change()
Dim k As Range, ilk_adres As String, a As Long
Dim i  As Long, syf As String
Dim myarr
ListBox1.Clear
If TextBox1.Value = "" Then Exit Sub
        ReDim myarr(1 To 10, 1 To 1)
        ...
I like the functionality your code provides - once one gets conditioned to the 'oranges and lemons' colour scheme!
 
I now have a working version but enabled by trial and error rather than any profound knowledge!
Code:
Private Sub TextBox1_Change()
Dim k As Range, ilk_adres As String, a As Long
Dim i  As Long, syf As String
Dim myarr
ListBox1.Clear
If TextBox1.Value = "" Then Exit Sub
        ReDim myarr(1 To 10, 1 To 1)
        ...
I like the functionality your code provides - once one gets conditioned to the 'oranges and lemons' colour scheme!
Thank You Vletm, Above code worked.
 
To solve your Can't find project or library" error in your code:
Open your file.
Press ALT+F11 to switch to the Visual Basic Editor.
On the Tools menu, click References.
Clear the check box for the type library or object library marked as "Missing:"
 
To solve your Can't find project or library" error in your code:
Open your file.
Press ALT+F11 to switch to the Visual Basic Editor.
On the Tools menu, click References.
Clear the check box for the type library or object library marked as "Missing:"
Thank You this also worked, but here problem is when i exit from the workbook ''missing'' library again get checked automatically whenever i again open the workbook.
 
Juzar22
Did You notice Marc L's reply #8 ?
Did You read and follow as there has been written?
Here a link:
 
Juzar22
If You read those rules ...
then ... hmm? how to ask?
... When would You start to follow those?
Isn't it like 'common sense' to find and read rules ... ?
... and sure, every forum has rules.
 
Juzar22
If You read those rules ...
then ... hmm? how to ask?
... When would You start to follow those?
Isn't it like 'common sense' to find and read rules ... ?
... and sure, every forum has rules.
Sure will use common sense next time and will follow the rules. Thank you
 
Back
Top