Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Find and Find Next, workbook

7 views
Skip to first unread message

Brian4777

unread,
Mar 13, 1999, 3:00:00 AM3/13/99
to
I've been trying to write a procedure for 1 month now and i just cant get it.
The procedure is for a find next that encompasses the entire work book. I can
get everything to work for one sheet, but when i try to get it to go to next
sheet everything goes to pot. If anyone has this code or can help me I would
really apprecitate it.

Thanks
Brian

Edward Willard

unread,
Mar 13, 1999, 3:00:00 AM3/13/99
to
Have you tried using a "for...each...next" loop with an array? This
loop will carry onto the next sheet with existing statements, I use them all
the time with a 12 sheet workbook.

example...

sub loop_run()
dim x as variant, sheets as variant
sheets = (array("sheet1", "sheet2", "sheet"))

for each x in sheets
{statements and/or actions, commands}
{what you have setup to perform on the first sheet}
next

This should get you into the next sheet without a problem.

I'm a beginner with VBA, but I'm not afraid to pass on what has been taught
to me.

Ed

Brian4777 wrote in message <19990313125401...@ng-fc1.aol.com>...

DMcRitchie

unread,
Mar 13, 1999, 3:00:00 AM3/13/99
to
Hi Brian, (posted with email copy)
Take a look at these archived postings which search each sheet.
http://www.dejanews.com/getdoc.xp?AN=434611017
http://www.dejanews.com/getdoc.xp?AN=331671730

I think you will find what you want in either of the above, specifically
looping through worksheets. I prefer to list pages to look at rather than
simply having code reposted over and over again. If those postings do not help
try looking at other postings in DejaNews archives. If that doesn't help you
will at least be able to ask a very specific question that covers why nothing
you found works for your situation.

DejaNews Power Search:
http://www.dejanews.com/home_ps.shtml

Search Keywords: sheets & for & next & sub
Subject: find
Forum: *excel*
Results Format: threaded
Results per page: 100

HTH, (I also have a page on searching newsgroups)
David McRitchie
My Excel Pages: http://members.aol.com/dmcritchie/excel/excel.htm

>From: bria...@aol.com (Brian4777)
>I've been trying to write a procedure for 1 month now and i just can't get it.
>The procedure is for a find next that encompasses the entire work book. I can
>get everything to work for one sheet, but when i try to get it to go to next
>sheet everything goes to pot. If anyone has this code or can help me I would
>really apprecitate it.

> Brian

0 new messages