• 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

Searching records using vba|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Searching records using vba|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 & MacrosSearching records using vba
sp_PrintTopic sp_TopicIcon
Searching records using vba
Avatar
Umesh Singh

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
August 1, 2020
sp_UserOfflineSmall Offline
1
August 1, 2020 - 3:38 am
sp_Permalink sp_Print

In my excel searching method not working. it gives the result no record founds in all condition. and if i add the record first time then it shown in my excel database but after fired searching method then my data wrapped and not show in excel but showing in vba application list box.

 

mainly i have faced a problem with searching method so plz plz plz resolve itt. 

1. first of all open the .xlsm file.

2. click on New Registration form btn on 'Hone' sheet  

3. click on list btn and then

4. search the record according, search by and search value field.

 

Attach : Screenshot of Workbook.1qq.pngImage Enlarger

2qq.pngImage Enlarger

 

and link of my workbook sheet.

https://drive.google.com/file/.....sp=sharing

 

plz download the .xlsm file from abovelink 

I have looking positive response from you.

 

Thankyou.

sp_PlupAttachments Attachments
  • sp_PlupImage 1qq.png (124 KB)
  • sp_PlupImage 2qq.png (109 KB)
Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1514
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
2
August 2, 2020 - 4:03 pm
sp_Permalink sp_Print

Hi Umesh,

That Google Drive link is asking me to request access for the file.  Can't you just attach the file to this thread?

Video instructions on how to do so are here

https://www.myonlinetraininghu.....this-first

Regards

Phil

Avatar
Umesh Singh

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
August 1, 2020
sp_UserOfflineSmall Offline
3
August 2, 2020 - 6:43 pm
sp_Permalink sp_Print

Good Evening,

And sorry for asking google request of sharable link.

 

I have can't upload .xlsm file due to file size. when upload the file then it gives the error msg 'Error 106 - Upload file size exceeds maximum allowed size'. so i provide google shareable link.

 

Now sharable link is accessible so please download the file from link 

https://drive.google.com/file/.....sp=sharing

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1514
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
4
August 3, 2020 - 9:30 am
sp_Permalink sp_Print sp_EditHistory

Hi Umesh,

I'm not really sure why you are using filters and then copying data between sheets?  If I was searching for something I'd write a sub like this

   Sub MOTHSearch()

      Dim Result As Range

      Set Result = Range("Table1[Name]").Find("Krishna")

   End Sub

Of course, you need to modify this to use the column being searched and search string from the userform.

Result will be the cell where your first match occurs.  From this you can get the row and then populate the form as needed.

As you already have your data in a Table, make use of the structured references to access the data in the columns so that you don't have to do this

iColumn = Application.WorksheetFunction.Match (sColumn, shDatabase.Range ("A1:AL1"), 0)

You can use the Find and FindNext methods on the column being searched to get all matches

https://docs.microsoft.com/en-us/office/vba/api/excel.range.find

https://docs.microsoft.com/en-us/office/vba/api/excel.range.findnext

Hope that helps.

Regards

Phil

Avatar
Umesh Singh

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
August 1, 2020
sp_UserOfflineSmall Offline
5
August 4, 2020 - 3:21 am
sp_Permalink sp_Print

i'm using filter according selection of filter type and the purpose of this filter is that find a record and could be delete , edit on selected(select record via over mouse point on a particular record) record.

 

it not necessary that copy the records between sheets it can be in a single sheet.

 

I'm a new learner of excel vba. so i have no depth knowledge about excel vba. But i want to learn the vba code so i have saw the other's code and try to learn.

Now, i humble request to you can you change the filtration method(codes) by own way and without changes the searching view structure. and it also can work delete and edit method same as current method??

 

please, please,  change the filter method as you want. So i have learn too easy and new concept of vba. 

And thanks for your support.

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Andy Kirby, Scott Miller, Roy Lutke, Jeff Krueger, Kylara Papenfuss, Ivica Cvetkovski
Guest(s) 8
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
John Chisholm
vexokeb sdfg
John Jack
Malcolm Toy
Ray-Yu Yang
George Shihadeh
Naomi Rumble
Uwe von Gostomski
Jonathan Jones
drsven
Forum Stats:
Groups: 3
Forums: 24
Topics: 6212
Posts: 27236

 

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