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: 3
Default Displaying the results of a Search

I have built a function that will find every instance of a record, and
then store those records in an array. What I would like to do is have
that information displayed in a window so that all the information
matching that record is displayed. I am relatively new to VBA and do
not know if this is even possible.

Here is the code that finds my records and sets them in the array:

Public Function BadgeSearch(myTXT As String, myCol As String, mycoL2
As String, myfiLler As Object)
'Searches for variable info that is provided by userform in the Master
List worksheet and returns the row value for updating

Badge = myTXT
Myrec = 3
myfiLler.Clear
ReDim myVal(0 To 0) As Integer
ReDim Myval2(0 To 0) As Integer
counTer = 0
Do Until Range(myCol & CStr(Myrec)).Text = ""
Do While (Range(myCol & CStr(Myrec)).Text = Badge)
If Range(myCol & CStr(Myrec)).Text = Badge Then
myfiLler.AddItem (Range(mycoL2 & Myrec).Value)
Myval2 = myVal
ReDim myVal(0 To counTer) As Integer
For z = 0 To UBound(Myval2)
myVal(z) = Myval2(z)
Next z
ReDim Myval2(0 To counTer)
myVal(counTer) = Myrec
counTer = counTer + 1
End If
Myrec = Myrec + 1
If Range(myCol & CStr(Myrec)).Text = "" Then
Exit Do
End If
Loop
Myrec = Myrec + 1
Loop
End Function

 
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
Displaying formula rather than results... RUSH2CROCHET Excel Discussion (Misc queries) 3 April 10th 06 05:21 PM
functions are not displaying the results [email protected] Excel Worksheet Functions 1 February 16th 06 01:27 PM
I cant do a search on this forum. Everytime I search, it comes up with zero results viswanthank Excel Programming 3 June 10th 05 09:15 AM
Sorting and displaying different results Mac New Users to Excel 1 April 6th 05 03:10 AM
displaying results and not formulas Marc S Excel Worksheet Functions 2 November 11th 04 01:34 PM


All times are GMT +1. The time now is 08:49 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"