Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 02-22-2021, 12:05 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:
If .ListIndex = -1 this means there is no selection
If there is no selection then .Text would be "" so Len(.Text) would be 0 and Val(0) would be zero

What do you think Val(Len(.Text)) would return as a boolean value?
Now I corrected as Below.
Not sure for a smooth operation because
Now What happens if i type for eg 2 and if that para is not there but 21, 32, 212 etc para are there. In this case how to implement smoothly with Msgbox "Para no 2 Does Not Exist"
and there is "Sky Blue" background behind the para no. digits. In this case also i had to select full Two digits or 3 digits with DarK Blue Colour for Complete para nos.
Why the selection cant operate automatically ?

Anything also can be worked out on the same for real smooth operation

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
End With

End Sub
SMehta
Thread 3: No: 46521 : Post No3 : TM 20
Reply With Quote
 



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 09:51 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