Forum

Compile error havin...
 
Notifications
Clear all

Compile error having copied your "Display all...userform

5 Posts
3 Users
0 Reactions
75 Views
(@beepee)
Posts: 14
Eminent Member
Topic starter
 
Display All Matches from Search in Userform ListBox

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

 
Posted : 22/03/2022 6:23 am
(@debaser)
Posts: 837
Member Moderator
 

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

 
Posted : 22/03/2022 5:07 pm
(@beepee)
Posts: 14
Eminent Member
Topic starter
 

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!

 
Posted : 23/03/2022 11:22 am
(@beepee)
Posts: 14
Eminent Member
Topic starter
 

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

 
Posted : 23/03/2022 1:37 pm
Philip Treacy
(@philipt)
Posts: 1631
Member Admin
 

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 columns

regards

Phil

 
Posted : 24/03/2022 2:43 am
Share: