LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Yet another Listbox question...

Hi All
I have been trying to modify my code below so that each time
the value in Textbox1 is found, instead of sending the the data found
in columns (A,B,C,D) of that row to 4 different Textboxes and having
to press ok in the msgbox to find the next matching value, I would
like to send the entire row of 4 columns of every match to a listbox
as it cycles through the columnA looking for matches..

I have found several pieces of code in this news group that would help
but not being a very good at programming have failed to integrate them
with any success. Although I have been able to generate several
different error messages) :)


Private Sub CommandButton1_Click()
i = 2

Do While Cells(i, 1).Value < ""


If TextBox1.Value = Cells(i,1).Value Then

TextBox2.Value = Cells(i, 1).Value 'columnA
TextBox3.Value = Cells(i, 2).Value 'columnB
TextBox4.Value = Cells(i, 3).Value 'columnC
TextBox5.Value = Cells(i, 4).Value 'columnD

MsgBox "Next Record"

End If

i = i + 1
Loop


End Sub



Any help would be appreciated

Pixel
 
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
ListBox question LearningExcel Excel Programming 2 January 3rd 06 05:42 PM
ListBox Question LearningExcel Excel Worksheet Functions 0 December 30th 05 05:46 PM
Listbox Question Greg B[_4_] Excel Programming 0 March 9th 05 12:46 AM
ListBox question jacqui[_2_] Excel Programming 1 February 12th 04 02:23 AM
ListBox Question Randal W. Hozeski Excel Programming 7 December 20th 03 09:59 PM


All times are GMT +1. The time now is 07:24 PM.

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"