Re: Textbox To Search When Press Enter
its not working... getting error.
compile error.
user-defined type not defined..
highlighting
[hr]*[/hr] Auto Merged Post;[dl]*[/dl]solved.. thanks for trying to help..
Re: Textbox To Search When Press Enter
its not working... getting error.
compile error.
user-defined type not defined..
highlighting
[hr]*[/hr] Auto Merged Post;[dl]*[/dl]solved.. thanks for trying to help..
Re: Textbox To Search When Press Enter
after the user has entered their data, and they press enter.
I have a form, and the form has a textbox. I have a button labeled search, and when it is clicked the macro searches for the information in the text box. How do i make the search action begin when the user press'es the enter key while on the textbox? Thank you!
Hi, if data in column a w/s data mathes cell c2 w/s geninfo then i want it to count that cell and give me a total for all those matching my criteria.. im not good with formulas. all help is greatly appreciated..
im using counta right now, but that just counts it all.[hr]*[/hr] Auto Merged Post;[dl]*[/dl]sorry, i should have been more direct.. i am using countif below
=COUNTIF(Data!F:F,'Gen Info.'!C5)
but, what i am having trouble with is coming up with
if Data F:F = C5 then
if Data I:I = "Active" then Count..
Re: Prevent Combobox Duplicates
The suggestion worked as it limited the amount of options allowed in combobox2, but it still does not apply this criteria to the search.. its still on search via combobox1 and is not taking combobox2 into consideration? my question is how do i get the code i posted earlier to search by both combobox'es
Re: Prevent Combobox Duplicates
ok, but you left off adding the information to the list box? how do i do that now?
Everytime i save my excel file as a CSV it removes the 0's. In column w i have data and i need the format to be 000. I format it under custom to that setting but when i save as csv it removes the first 0. With my dates it also changes my mm/dd/yyyy to m/dd/yyyy
Re: Combobox Duplicates
yea, im using on example roy put together on his site.. below is the code i am using.. i would like to add another combobox that i could use as search criteria.. basicly if combobox1 was found in col a2, then if combobox2 was found in b2 then its a match and all is good.. but now what it does when i add the combobox2 is just search for combobox2 disregarding combobox1.. anyhow.. here is the code im using with one combobox.. its very limited.. if someone would just show me how to use 2 that would be awesome. thanks.
Private Sub cmbFindAll_Click()
Dim FirstAddress As String
Dim strFind As String 'what to find
Dim rSearch As Range 'range to search
Dim fndA, fndB, fndC, fndD, fnde, fndf, fndg, fndh As String
Dim head1, head2, head3, head4, head5, head6, head7, head8 As String 'heading s for list
Dim i As Integer
i = 1
Set rSearch = Sheet1.Range("a2", Range("a65536").End(xlUp))
strFind = Me.ComboBox1.Value
With rSearch
Set c = .Find(strFind, LookIn:=xlValues)
If Not c Is Nothing Then 'found it
c.Select
'load the headings
head1 = Range("a1").Value
head2 = Range("b1").Value
head3 = Range("c1").Value
head4 = Range("d1").Value
head5 = Range("e1").Value
head6 = Range("f1").Value
head7 = Range("g1").Value
head8 = Range("h1").Value
With Me.ListBox1
MyArray(0, 0) = head1
MyArray(0, 1) = head2
MyArray(0, 2) = head3
MyArray(0, 3) = head4
MyArray(0, 4) = head5
MyArray(0, 5) = head6
MyArray(0, 6) = head7
MyArray(0, 7) = head8
End With
FirstAddress = c.Address
Do
'Load details into Listbox
fndA = c.Value
fndB = c.Offset(0, 1).Value
fndC = c.Offset(0, 2).Value
fndD = c.Offset(0, 3).Value
fnde = c.Offset(0, 4).Value
fndf = c.Offset(0, 5).Value
fndg = c.Offset(0, 6).Value
fndh = c.Offset(0, 7).Value
MyArray(i, 0) = fndA
MyArray(i, 1) = fndB
MyArray(i, 2) = fndC
MyArray(i, 3) = fndD
MyArray(i, 4) = fnde
MyArray(i, 5) = fndf
MyArray(i, 6) = fndg
MyArray(i, 7) = fndh
i = i + 1
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> FirstAddress
End If
End With
'Load data into LISTBOX
Me.ListBox1.List() = MyArray
'Me.Height = 318
End Sub
Display More
Re: Combobox Duplicates
im sorry, but my skills are not developed enough to understand what you are saying. I have previously posted workbook examples, but i just need the segment below fixed? is that not possible, or am i goin to have to try another route?
Re: Combobox Duplicates
Thanks. I will do that.. Im trying to use .find to locate information based on the criteria from 2 combobox'es. i have made an attempt, but its not working. It only picks up data based on what is entered in comboxbox2. Can you help?
Private Sub cmbFindAll_Click()
Dim FirstAddress As String
Dim strFind As String, strfind2 As String 'what to find
Dim rSearch, rsearch2 As Range 'range to search
Dim fndA, fndB, fndC, fndD, fnde, fndf, fndg, fndh, fndi As String
Dim head1, head2, head3, head4, head5, head6, head7, head8, head9 As String 'heading s for list
Dim i As Integer
i = 1
Set rSearch = Sheet1.Range("a2", Range("a65536").End(xlUp))
Set rsearch2 = Sheet1.Range("b2", Range("b65536").End(xlUp))
strFind = Me.ComboBox1.Value
strfind2 = Me.ComboBox2.Value
With rSearch
Set c = .Find(strFind, LookIn:=xlValues)
End With
With rsearch2
Set c = .Find(strfind2, LookIn:=xlValues)
If Not c Is Nothing Then
' With rSearch
' Set c = .Find(strFind, LookIn:=xlValues)
' End With
' With rsearch2
' Set c = .Find(strfind2, LookIn:=xlValues)
' If Not c Is Nothing Then 'found it
c.Select
'load the headings
head1 = Range("a1").Value
head2 = Range("b1").Value
head3 = Range("c1").Value
head4 = Range("d1").Value
head5 = Range("e1").Value
head6 = Range("f1").Value
head7 = Range("g1").Value
head8 = Range("h1").Value
head9 = Range("i1").Value
With Me.ListBox1
MyArray(0, 0) = head1
MyArray(0, 1) = head2
MyArray(0, 2) = head3
MyArray(0, 3) = head4
MyArray(0, 4) = head4
MyArray(0, 5) = head5
MyArray(0, 6) = head6
MyArray(0, 7) = head7
MyArray(0, 8) = head8
MyArray(0, 9) = head9
End With
FirstAddress = c.Address
Do
'Load details into Listbox
fndA = ComboBox1.Value
fndB = ComboBox2.Value
fndC = c.Offset(0, 1).Value
fndD = c.Offset(0, 2).Value
fnde = c.Offset(0, 3).Value
fndf = c.Offset(0, 4).Value
fndg = c.Offset(0, 5).Value
fndh = c.Offset(0, 6).Value
fndi = c.Offset(0, 7).Value
MyArray(i, 0) = fndA
MyArray(i, 1) = fndB
MyArray(i, 2) = fndC
MyArray(i, 3) = fndD
MyArray(i, 4) = fnde
MyArray(i, 5) = fndf
MyArray(i, 6) = fndg
MyArray(i, 7) = fndh
MyArray(i, 8) = fndi
i = i + 1
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> FirstAddress
End If
End With
'Load data into LISTBOX
Me.ListBox1.List() = MyArray
End Sub
Display More
**ComboBox worked like a charm. thanks.
Re: Form Based On Conditions
i posted my example to another question i asked on accident. So i am posting it here as it is where it needs to go. i need this form to search by state and county.. its just skipping over the state criteria and going to county. thank you.
Re: Combobox Duplicates
Ok, I have spent a great deal of time manipulating one of roy's database forms to make this work. however, for some reason it does not search correctly. it picks up the county right, but not the state.. i need it to search by state and county.. both being criteria. not just county. thanks for your help
Re: Combobox Duplicates
Okay, I dony understand. My combobox is setup with code below
How do i stop my combobox from displaying duplicate entries?
Re: Form Based On Conditions
I found this form, and it would be perfect, but i cannot get it to work.
Re: Form Based On Conditions
I cannot find anything on that site.
I am looking to create a database using excel.. This workbook will contain a list of information.. In col A it will have states, in col B it will have cities and in col c it will have names. If a user selects he state in drop down A (on a form) and selects the city (on a form) then i would like the form to also display the names (in boxes on the same form) for the user to view. Has anyone done this? if not how would i create a form to do so? i know my vba/vb, but im not good with forms.
thanks for your help.
Re: Internet Explorer Buttons
i have reviewed the source code, but im still having no luck.
Re: Internet Explorer Buttons
I have tried every form name I can identify and none work. Any ideas on how to find which form I need be placing between the () to get it to submit?
Re: Internet Explorer Buttons
bump.