• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Unable to use Results.Clear getting an error|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Unable to use Results.Clear getting an error|VBA & Macros|Excel Forum|My Online Training Hub

vba course banner

Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosUnable to use Results.Clear getting…
sp_PrintTopic sp_TopicIcon
Unable to use Results.Clear getting an error
Avatar
Anthony Curran

New Member
Members
Level 0
Forum Posts: 2
Member Since:
July 21, 2022
sp_UserOfflineSmall Offline
1
July 21, 2022 - 9:51 am
sp_Permalink sp_Print

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.

Avatar
Catalin Bombea
Iasi, Romania
Admin
Level 10
Forum Posts: 1824
Member Since:
November 8, 2013
sp_UserOfflineSmall Offline
2
July 23, 2022 - 2:00 pm
sp_Permalink sp_Print

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.

Avatar
Anthony Curran

New Member
Members
Level 0
Forum Posts: 2
Member Since:
July 21, 2022
sp_UserOfflineSmall Offline
3
July 23, 2022 - 3:31 pm
sp_Permalink sp_Print

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

Avatar
Catalin Bombea
Iasi, Romania
Admin
Level 10
Forum Posts: 1824
Member Since:
November 8, 2013
sp_UserOfflineSmall Offline
4
July 23, 2022 - 8:33 pm
sp_Permalink sp_Print

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.pngImage Enlarger

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.pngImage Enlarger

sp_PlupAttachments Attachments
  • sp_PlupImage Screenshot-2022-07-23-132955.png (94 KB)
  • sp_PlupImage Screenshot-2022-07-23-133111.png (31 KB)
sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Geoff McClure, Tom VAN LOO, Misael Gutierrez Sr.
Guest(s) 7
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 873
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 222
Jessica Stewart: 218
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Cathi Giard
Sarah Young
Henry Delgado
Alita Nieuwoudt
KL KOH
Joao Marques
Regi Hampton
Taffie Elliott
Paramita Chakraborty
David du Toit
Forum Stats:
Groups: 3
Forums: 24
Topics: 6358
Posts: 27805

 

Member Stats:
Guest Posters: 49
Members: 32335
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.