INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Search a Grid for a Word..

Search a Grid for a Word..

(OP)
I have a grid loaded into a datagridview eg
'GRID............
T A S S A Y A E S
A N O N L U T R K
O V E R T O E S T
T R A S T K U Y N
O S L A A A K R E
S K L S L E V A N
E L A S S M I T I
Y E V A D Y T U M
A N A T T E R Y E

I have a list of 10 words and need to loop
through each word and see if its anywhere in the grid..
horizontally, vertically and (fully diagonally in all directions,even backwards)

??is there and vb.code that can do this easily ..

Inititially i thought this would be easy BUT !! beyond me.

Really appreciate any help

trob70

RE: Search a Grid for a Word..

What have you tried so far? Show some code, even if it did not work.

Have fun.

---- Andy

There is a great need for a sarcasm font.

RE: Search a Grid for a Word..

(OP)
Have worked out a simple method of solving the problem
I have loaded the grid indented 10 columns.

I was having a problem with the diagonal search as i did
not have the same length line ie started with 1x1 ended with 1x10
by moving the grid over i had the diagonal the same length
as horizontal

Thanks for the offer of help

Regards Trob70

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close