Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-22-2021, 02:13 AM
Guessed's Avatar
Guessed Guessed is offline Search Para No(s). thru Autofilter Combobox Windows 10 Search Para No(s). thru Autofilter Combobox Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,159
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Can you explain the behaviour you want?



ComboBoxes are typically used by the user clicking in them, not by typing text in a random order and seeing the list reset its contents then using enter or arrow keys to type more numbers.

Edit: I've just had a look at the working Excel code that you referred to in your first post. I'm not seeing any value in stepping away from the actual code shown there. Why have you varied so much of the code in your implementation?
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #2  
Old 02-22-2021, 04:00 AM
SMehta SMehta is offline Search Para No(s). thru Autofilter Combobox Windows 10 Search Para No(s). thru Autofilter Combobox Office 2013
Novice
Search Para No(s). thru Autofilter Combobox
 
Join Date: Jan 2021
Posts: 29
SMehta is on a distinguished road
Default

Quote:
ComboBoxes are typically used by the user clicking in them, not by typing text in a random order and seeing the list reset its contents then using enter or arrow keys to type more numbers.
Ok,
As i have to Search Para No(s) only. After much exploaration, The Excel link as #1 had this result somehow managed to implement.
I Thought ComboBox = TextBox + DropDown List OR Listbox so by typing something in ComboBox its related values or the defined values will display.
As ComboBox is used to store and display list of items to a list.

So What i thought of : By retrieving a Para No(s). I would like to see the Text of that Para No(s) of the document in Textbox.

Quote:
Can you explain the behaviour you want?
What i Expect from Combbobox if i Type a complete Para.No like 2 it should get hi-lited and load the details of Para (2) in textbox
if Para no 2. Is not there. Then MSBOX TO APPEAR PARA NO 2 Does not Exists ?

But then the list resets its contents and other related nos are seen as per Excel Coding

So When i typed 2 the list displayed as 21, 121, 210 etc but skyblue colour was focussed on 1 of 21 and not fully focussed on 21. This inidcated that Para No. 2 is not there in the List.
As list reset it contents then 21, 121 210 etc were seen in the Combobox.

To see one of the effect
i took cursor to extreme left of 21 and i typed 1 to 21 which became 121. This got automatically hilited and details of Para 121 were seen in textbox.

Also by CLICKING (Mouse Arrow / KeyPad Arrow) on the other related Displayed list Para number. The details of Para got uploaded in textbox.

I've explained my expected behaviour against the Strange Default Behaviour of MS-Word Userform Combobox.

Quote:
Why have you varied so much of the code in your implementation?
Really Got confused. Sorry My mistake. Then I rectified as per excel coding. Also learnt about .ListIndex after your comment in #2

My Sincere request to you and other senior Forum Team members of this forum to kindly bear with me. As this is something new for me. Will take sometime to digest and implement.

SMehta
Thread 3: No: 46521 : Post No5 : TM 21
Reply With Quote
  #3  
Old 02-23-2021, 09:36 AM
SMehta SMehta is offline Search Para No(s). thru Autofilter Combobox Windows 10 Search Para No(s). thru Autofilter Combobox Office 2013
Novice
Search Para No(s). thru Autofilter Combobox
 
Join Date: Jan 2021
Posts: 29
SMehta is on a distinguished road
Default

Somehow managed but still not Suceesful
Code:
Private Sub cmbParaNos_Change()

Dim i As Long
Dim oBkMrk As Bookmark
Dim wdActDoc As Document
Set wdActDoc = ActiveDocument

With cmbParaNos

If Not IsArrow Then .List = myArrayParaList
If .ListIndex <> -1 And Len(.Text) Then
    For i = .ListCount - 1 To 0 Step -1
            If InStr(1, .List(i), .Text, 1) = 0 Then .RemoveItem i
    Next i
   .DropDown
End If

 If .ListIndex > -1 Then
    Else
    MsgBox .Text & " Empty Para No(s)."   
End If

End With
End Sub
The above coding for correct Msgbox appearing is not sufficient enough to derive the 1st and 2nd Criteria Msg

As the List contains only Para.Nos with details
Msgbox Required here as per Criteria
1. Msg for Empty Para.nos which are not shown in the List
2. Msg for Non-Existing Para Nos.
For eg Total Para are 243 with Empty Paras
so 244, 245 etc are
if typed/Selected 244 then MSGBOX 244 "DOES NOT EXISTS"
if typed/Selected 245 then MSGBOX 245 "DOES NOT EXISTS"
if typed/Selected 242 then MSGBOX 242 "Empty Para No(s)."



SMehta
Thread 3: No: 46521 : Post No6 : TM 22
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to get number of para in Combobox SMehta Word VBA 2 02-20-2021 07:15 AM
How to autofilter by exact date? LearnerExcel Excel 5 06-19-2018 03:30 PM
Autofilter on two Date Columns OTPM Excel Programming 3 04-29-2014 12:56 AM
Search Para No(s). thru Autofilter Combobox Sum on AutoFilter Grasshopper Excel 3 02-14-2013 01:41 AM
Search Para No(s). thru Autofilter Combobox AutoFilter Criteria3 coxjamd Excel Programming 2 01-17-2013 02:24 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:25 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft