Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 07-04-2009, 03:18 PM
stephen1000 stephen1000 is offline
Valued Forum Contributor
 
Join Date: 28 Nov 2008
Location: Norfolk UK
MS Office Version:2007
Posts: 221
stephen1000 Has established their mark in the community
Smile searching data using a userform

Please Register to Remove these Ads

Hi Guys,

I think a simple task, not used to many user forms in the past

I am looking to enter a numeric value these are the green columns.

it then needs to search the workbook for that number (Barcode Number)

then if the cell to the right has a value, it needs to pull that number into the userform' if no number is next to it, then I manually write and post it the cell next to the one just found.......

easy peasy (NOT)

cheers in advance


Stephen
Attached Files
File Type: xls Userform 1.xls (333.0 KB, 8 views)

Last edited by stephen1000; 07-05-2009 at 04:57 AM.
Reply With Quote
  #2  
Old 07-04-2009, 06:01 PM
Ancalagon12321 Ancalagon12321 is offline
Registered User
 
Join Date: 03 Jul 2009
Location: London, England
MS Office Version:Excel 2003
Posts: 17
Ancalagon12321 is becoming part of the community
Re: searching data using a userform

Does this do the trick?
Attached Files
File Type: xls Userform 1.xls (344.5 KB, 14 views)
Reply With Quote
  #3  
Old 07-04-2009, 06:06 PM
Ancalagon12321 Ancalagon12321 is offline
Registered User
 
Join Date: 03 Jul 2009
Location: London, England
MS Office Version:Excel 2003
Posts: 17
Ancalagon12321 is becoming part of the community
Re: searching data using a userform

I guess I ought to provide some instructions:

To open the form go to Tools > Macro > Macros > "DoForm"

The first button is a "read" button - it looks up the invoice number corresponding to the barcode number, and puts it into the second text box.

The second button is a "write" button - it takes whatever's in the second text box and writes it into the data.

I haven't made it very error proof, secure or intuitive but after all, I'm not getting paid.
Reply With Quote
  #4  
Old 07-05-2009, 04:20 AM
royUK's Avatar
royUK royUK is offline
Forums Administrator
 
Join Date: 18 Nov 2003
Location: Derbyshire,UK
MS Office Version:Xp; 2007
Posts: 13,749
royUK Has a higher level of understanding royUK Has a higher level of understanding royUK Has a higher level of understanding royUK Has a higher level of understanding royUK Has a higher level of understanding royUK Has a higher level of understanding royUK Has a higher level of understanding
Re: searching data using a userform

Your post does not comply with Rule 9 of our Forum RULES. If you solve a problem yourself before anyone else has responded, please take a moment to describe your solution, chances are some other member will benefit. And please never edit a thread in which someone else has responded.

How to mark a thread Solved
Go to the first post
Click edit
Click Go Advanced
Just below the word Title you will see a dropdown with the word No prefix.
Change to Solved
Click Save
__________________
Hope that helps.

RoyUK
--------
If you are pleased with a member's answer then use the Scales icon to rate it

For Excel consulting, free examples and tutorials visit my site
Check out the free Excel Toolbar

New members please read & follow the Forum Rules

Remember to mark your questions Solved and rate the answer(s)


Code Tags: Make your code easier for us to read
Reply With Quote
  #5  
Old 07-05-2009, 04:43 AM
stephen1000 stephen1000 is offline
Valued Forum Contributor
 
Join Date: 28 Nov 2008
Location: Norfolk UK
MS Office Version:2007
Posts: 221
stephen1000 Has established their mark in the community
Re: searching data using a userform

Quote:
Originally Posted by Ancalagon12321 View Post
I guess I ought to provide some instructions:

To open the form go to Tools > Macro > Macros > "DoForm"

The first button is a "read" button - it looks up the invoice number corresponding to the barcode number, and puts it into the second text box.

The second button is a "write" button - it takes whatever's in the second text box and writes it into the data.

I haven't made it very error proof, secure or intuitive but after all, I'm not getting paid.

Hi Ancalagon,

Thanks for that, its a start; just dicovered that all the numbers in green have formulas not values in,so it does not work unless i change cells to numeric values.

I did organize this sheet, will need a bit of re-thinking.

cheers for what you did

stephen
Reply With Quote
  #6  
Old 07-05-2009, 10:58 AM
Ancalagon12321 Ancalagon12321 is offline
Registered User
 
Join Date: 03 Jul 2009
Location: London, England
MS Office Version:Excel 2003
Posts: 17
Ancalagon12321 is becoming part of the community
Re: searching data using a userform

Stephen: Find the line of code that uses "Find" and change it from this:

Code:
something.Find(something)
to this:

Code:
something.Find(something, LookIn:=xlValues)
Reply With Quote


Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump