LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 167
Default Find ALL WorkSheets according to 2 ComboBox Values.... Help wi

Corey,

Using the Excel Find... menu will not allow you to do what you want. It
searches each cell individually and therefore would find all the sheets with
"Fred" in it or all the sheets with "CV2" in it, but not both at the same
time.

Is there some reason why you need it to got through the Excel Find...? You
can have the list of sheets populate a message box (as I did in the code I
sent you) or you can have it write to a sheet, or an external file, etc.

Mike

"Corey" wrote:

OK Just got further now, thanks to Mikes reply to another of my posts.

Private Sub UserForm_Activate()
Dim i As Integer, j As Integer
Dim addit As Boolean, addit2 As Boolean
ComboBox3.Clear
For Each wks In Worksheets
addit = True
For i = 0 To ComboBox3.ListCount - 1
If ComboBox3.ListCount = 0 Then Exit For
If wks.Range("B3").Text = ComboBox3.List(i) Then addit = False Next i
If addit Then ComboBox3.AddItem wks.Range("B3").Text
Next wks
End Sub

Private Sub ComboBox3_Change() ComboBox4.Clear For Each wks In Worksheets
If wks.Range("b3").Text = ComboBox3.Value Then addit2 = True
For j = 0 To ComboBox4.ListCount - 1
If ComboBox4.ListCount = 0 Then Exit For
If wks.Range("D3").Text = ComboBox4.List(j) Then addit2 = False
Next j
If addit2 Then ComboBox4.AddItem wks.Range("D3").Text End If
Next wks
End Sub

Private Sub Combobox4_Change() Dim combolist
If ComboBox4.ListCount = 0 Then Exit Sub
For Each wks In Worksheets
If wks.Range("B3") = ComboBox3.Value And wks.Range("D3") = _
ComboBox4.Value Then combolist = combolist & wks.Name & Chr(10)
Next wks
' MsgBox (combolist)
End Sub

Private Sub CommandButton1_Click()
UserForm1.Hide
End Sub


HOW CAN I ADD TO THIS A FIND CODE TO DISPLAY ALL SHEETS THAT CONTAIN THE
USERFORM VALUE ??

Corey....



 
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
How do I find and replace null values in Excel 2002 worksheets? Peter Excel Worksheet Functions 5 October 27th 06 04:53 AM
code to FIND value, copy, paste values onto other sheet ufo_pilot Excel Programming 2 December 6th 05 04:14 PM
UDF code to find specific text in cell comments, then average cell values bruch04 Excel Programming 3 December 5th 05 10:01 PM
Code to compare cell values from different worksheets Ed P[_2_] Excel Programming 1 February 18th 05 03:26 PM
Fill values into a listbox matching selected values from a combobox Jon[_19_] Excel Programming 4 January 25th 05 04:25 PM


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