Excel - Search Form

Asked By Kenn on 22-Sep-08 06:52 PM
I need help with a macro I am going to build - not sure at all how to get
there.
I want to create a macro that when ran will pop up box with three entry
fields:
Name1:
Name2:
Account#:

when the user populates name 1 it will search column B; once a match is
found it will set focus to that found cell, then a vb yes/no window will pop
up. If the user answers yes then it will set focus to column b of that same
row and the macro will end otherwise if no is selected it will continue to
search the column and end the maco with a pop up no data found.

same thing with the other two choices except:
Name 2 will search column d and account# will search column f

I would appreciate any help you can provide




NoodNutt replied on 22-Sep-08 08:47 PM
G'day Kenny

Try Debra Dalgleish's website, she has a mulitple Data validation listbox
for dependants which I think will help you with your task.

Somewhere to start, anyways!

http://www.contextures.com/xlDataVal13.html

It lets you select both directions, by that I mean, if you select a name
from listbox.1, it will filter everything that matchs into listbox.2 and
viceversa and so on.

Check it out, have a play.

HTH
Mark.
rhbridg.RemoveThisNod replied on 23-Sep-08 01:34 AM
I've never done this particular thing, but it sounds to me like you need
three routines, named Name1_Change, Name2_Change and Account#_Change (except
it says here you can't use '#' in a VB name, so apparently you'll have to
name it something else and then call it AccountNbr_Change or whatever).  Each
of these Subs will do the appropriate search, focus and cell activation, plus
whatever else you want to do.

But just how unsure are you of how to get there?  Have you ever written any
VBA/Excel program at all?  What parts DO you know how to do, and what parts
not?  I don't suppose you want someone to write a primer on the nature of
variables, functions and data types; you have something to start with, but
what?