Forum

Unable to use Resul...
 
Notifications
Clear all

Unable to use Results.Clear getting an error

4 Posts
2 Users
0 Reactions
126 Views
(@curranaj)
Posts: 2
New Member
Topic starter
 

I am running into the issue from the "Display All Matches..." When I copied the code to use in my workbook I run into the error of Results.Clear not being there as in your workbook. I am running Excel 2016 any work around or fix I can do to fix this issue. I discovered that the reference is F3Dynamic... which is not with my workbook. Any help could be useful. Thank you.

 
Posted : 21/07/2022 7:51 pm
(@catalinb)
Posts: 1937
Member Admin
 

Hi Anthony,
Can you please give us a clue to understand to what code you are referring to?
A sample file with your code will be the best idea, this way we'll be easier to help you fix all the problems.

 
Posted : 24/07/2022 12:00 am
(@curranaj)
Posts: 2
New Member
Topic starter
 

Not sure how to add a sample. But here is the code I am running Office 2016 and it is not recognizing the Results.Clear. When I pasted his code into my workbook and adjusted for my workbook it halts at that code. with an error. when I looked at the object browser of it in my workbook there is no reference. When I looked in Philip Treacy downloaded workbook the refrence show F3 Dynamic Library. I cannot find it in my workbook.

Option Explicit

' Written by Philip Treacy
' Display All Matches from Search in Userform ListBox
'
Dim FormEvents As Boolean

Private Sub ClearForm(Except As String)

' Clears the list box and text boxes EXCEPT the text box
' currently having data entered into it

Select Case Except

Case "FName"
FormEvents = False
LName.Value = ""
Location.Value = ""
Department.Value = ""
Results.Clear
FormEvents = True

Case "LName"
FormEvents = False
FName.Value = ""
Location.Value = ""
Department.Value = ""
Results.Clear
FormEvents = True

Case "Location"
FormEvents = False
FName.Value = ""
LName.Value = ""
Department.Value = ""
Results.Clear
FormEvents = True

Case "Department"
FormEvents = False
FName.Value = ""
LName.Value = ""
Location.Value = ""
Results.Clear
FormEvents = True

Case Else
FormEvents = False
FName.Value = ""
LName.Value = ""
Location.Value = ""
Department.Value = ""
Results.Clear
FormEvents = True

End Select

End Sub

 
Posted : 24/07/2022 1:31 am
(@catalinb)
Posts: 1937
Member Admin
 

Hi Anthony,

Results is a listbox object, if the code does not recognize it, you might have deleted it or renamed.
See image attached.
Screenshot-2022-07-23-132955.png

To attach a file, there is an Attachment button under editor area. (You will see 2 buttons: Add File and Start Upload, use them both)

 

Screenshot-2022-07-23-133111.png

 
Posted : 24/07/2022 6:33 am
Share: