• 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
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Compile error having copied your "Display all...userform|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Compile error having copied your "Display all...userform|VBA & Macros|Excel Forum|My Online Training Hub
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 & MacrosCompile error having copied your "D…
sp_PrintTopic sp_TopicIcon
Compile error having copied your "Display all...userform
Avatar
Barry Pegram
Gloucestershire UK
Member
Members
Level 0
Forum Posts: 14
Member Since:
March 21, 2022
sp_UserOfflineSmall Offline
1
March 21, 2022 - 8:23 pm
sp_Permalink sp_Print
Display All Matches from Search in Userform ListBox

AUGUST 20, 2020 BY PHILIP TREACY 

Hi. Recently discovered the above program. I am very much a beginer at VBA so have probably made some simple copying error when I tried to reproduce the example to suit my (budding) gardening almanac spreadsheets.

Anyway I have an error that I don't understand - something silly no doubt...:

Error msg is "Method or data member not found" this occurs whin I try to enter data into the form. The error highlight occurs in the first Case statement as: ".Clear"

I have (hopefully) attached the test file I am using.

Any help will be much appreciated.

Thanks in anticipation

Beepee

sp_AnswersTopicSeeAnswer See Answer
Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 625
Member Since:
November 1, 2018
sp_UserOnlineSmall Online
2
March 22, 2022 - 7:07 am
sp_Permalink sp_Print

Your Results control is a textbox, but should be a Listbox.

sp_AnswersTopicAnswer
Answers Post
Avatar
Barry Pegram
Gloucestershire UK
Member
Members
Level 0
Forum Posts: 14
Member Since:
March 21, 2022
sp_UserOfflineSmall Offline
3
March 23, 2022 - 1:22 am
sp_Permalink sp_Print

Thought it would be something straightforward. Many thanks this problem is now resolved  - not getting the right results displayed but I'll try to resove myself... but I may be back.

Cheers!

Avatar
Barry Pegram
Gloucestershire UK
Member
Members
Level 0
Forum Posts: 14
Member Since:
March 21, 2022
sp_UserOfflineSmall Offline
4
March 23, 2022 - 3:37 am
sp_Permalink sp_Print

Hello again -- said I may be back. I think my mum told me about biting off more than I can chew!!!!!

Sorted the ListBox issue thanks. Now it works in a limited way. It only list the first field (IDRef) the remaining fields, in the list box, remain empty. I really thought I had copied Philip T's. code carefully but I presume not. However I cannot see where I have gone wrong.

Again thanks in anticipation to whoever comes to my rescue.

regards

Beepee

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1518
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
5
March 23, 2022 - 4:43 pm
sp_Permalink sp_Print

Hi Barry,

The Listbox has a setting that controls the number of columns it contains.  You had it set to 1 column, it just needs to be set to 4.

listbox columnsImage Enlarger

regards

Phil

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Velouria, Dario Serrati, Valentyn Kristioglo, Nada Perovic, Andrew Er
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 871
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Raj Mattoo
Mark Luke
terimeri dooriyan
Jack Aston
AndyC
Denise Lloyd
michael serna
mashal sana
Tiffany Kang
Leah Gillmore
Forum Stats:
Groups: 3
Forums: 24
Topics: 6219
Posts: 27279

 

Member Stats:
Guest Posters: 49
Members: 31903
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.