Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Project to use an array & loop but still baffled

Status
Not open for further replies.

glarior

Programmer
Aug 4, 2005
42
US
First I would like to thank macropod & fumei for there help which got my project rolling good until I became puzzled.

Sorry this is going to be a little long but I would like for you to understand what I am trying to do.

I have a word document with 'sink' checklist for when we do our maintenance on them. Each 'sink' is separated by a page break. I created a listbox of our sinks so at any given time someone can click on the sink they are going to do the maintenance on and the program will open the main spec sheet and gather all the data for that sink.

So far I have my program find where that single sink is in the document, copy, paste it on a new document and save it.
I am taking baby steps on this one, I have only been doing VBA for a week now.

What I want to do is when the person selects what sink they want it will already have defined what type of sink units are in that sink and store it in an array. Then it will find where the first sink unit is on the document and copy, paste etc. Then loop and change the search word to the next on in my array. That is where I am having my problem.

I want to be able to store info for each sink in an array and every time it goes through a loop to change the text search to my next array text which was predefined by my code for each sink.

What kind of loop type would you use?

How do I change my search text to the next predefined array text?

I do have a book which is really nice and have been reading up on this stuff but all my tries have become unsuccessful I hope your input will help, till than I am going to keep experimenting to see what I can get to work.

If you would like I can include some of my code to help you understand, or if you are still confused just let me know.

I am really thankful for your help and for this forum to be around. Infact from reading post on this forum I found a way to speed up my last program 4-5times!!!! THANKS!!!

Glarior




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top