![]() |
|
#1
|
||||
|
||||
![]()
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 |
#2
|
|||
|
|||
![]() Quote:
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:
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:
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 |
#3
|
|||
|
|||
![]()
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 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 |
![]() |
|
![]() |
||||
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 |
![]() |
Grasshopper | Excel | 3 | 02-14-2013 01:41 AM |
![]() |
coxjamd | Excel Programming | 2 | 01-17-2013 02:24 PM |