Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default what is the code cann make this pls. help me

i have form to search for data through text box change code efect on
listbox its working ok with this code
Private Sub TextBox1_Change()
On Error Resume Next
Dim KH_Range As Range
Dim M As String
Set KH_Range = Range("DATA")
M = TextBox1.Text
ListBox1.Clear
If M = "" Then GoTo 1
W = ListBox1.ListCount
With KH_Range
KH_1 = .Rows.Count
KH_2 = .Columns.Count
Set A = Range(.Cells(1,
1), .Cells(.Rows.Count, .Columns.Count)).FIND(M)
If Not A Is Nothing Then
F = A.Address
Do

ListBox1.AddItem
ListBox1.List(W, 0) = Sheet3.Cells(A.Row, 1).Value
ListBox1.List(W, 1) = Sheet3.Cells(A.Row, 2).Value
ListBox1.List(W, 2) = Sheet3.Cells(A.Row, 3).Value
ListBox1.List(W, 3) = Sheet3.Cells(A.Row, 4).Value
ListBox1.List(W, 4) = Sheet3.Cells(A.Row, 5).Value
ListBox1.List(W, 5) = Sheet3.Cells(A.Row, 6).Value

W = W + 1


Set A = Range(.Cells(1, 1), .Cells(KH_1, KH_2)).FindNext(A)
Loop While Not A Is Nothing And A.Address < F
End If
End With
Set A = Nothing
1 End Sub

i want to hilight first row in list box contain data match textbox
text when change it
can any one help .
thanks advanced
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default what is the code cann make this pls. help me

On Mar 23, 3:31*pm, "abu "
wrote:
i have form to search for data through text box change code efect on
listbox its working ok with this code
Private Sub TextBox1_Change()
On Error Resume Next
Dim KH_Range As Range
Dim M As String
Set KH_Range = Range("DATA")
M = TextBox1.Text
ListBox1.Clear
If M = "" Then GoTo 1
W = ListBox1.ListCount
* *With KH_Range
* * * KH_1 = .Rows.Count
* * * KH_2 = .Columns.Count
* * * * *Set A = Range(.Cells(1,
1), .Cells(.Rows.Count, .Columns.Count)).FIND(M)
* * * * *If Not A Is Nothing Then
* * * * *F = A.Address
* * * * *Do

* * * * * * ListBox1.AddItem
* * * * * * ListBox1.List(W, 0) = Sheet3.Cells(A.Row, 1).Value
* * * * * * ListBox1.List(W, 1) = Sheet3.Cells(A.Row, 2).Value
* * * * * * ListBox1.List(W, 2) = Sheet3.Cells(A.Row, 3).Value
* * * * * * ListBox1.List(W, 3) = Sheet3.Cells(A.Row, 4).Value
* * * * * * ListBox1.List(W, 4) = Sheet3.Cells(A.Row, 5).Value
* * * * * * ListBox1.List(W, 5) = Sheet3.Cells(A.Row, 6).Value

* * * * * * W = W + 1

* * * * *Set A = Range(.Cells(1, 1), .Cells(KH_1, KH_2)).FindNext(A)
* * * * *Loop While Not A Is Nothing And A.Address < F
* * * * *End If
* End With
Set A = Nothing
1 End Sub

i want to hilight first row in list box contain data match textbox
text when change it
can any one help .
thanks advanced


up
pls any help its urgent
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Verify Canadian Postal Code ~ make the code work jat Excel Programming 2 February 27th 09 09:12 PM
make code less lines Brettjg Excel Programming 4 February 17th 09 09:31 PM
How do I make a Bar code ??? Wadewild Excel Discussion (Misc queries) 2 June 9th 08 09:08 PM
How to make a button VBA code reference other VBA code subroutines??? gunman[_9_] Excel Programming 4 September 27th 05 01:01 AM
How to make VBA code to self-destroy itself? count Excel Programming 6 November 10th 04 05:11 PM


All times are GMT +1. The time now is 05:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"