Yet another Lotus macro question

G

Guest

I have for the most part converted to Excel but have a simple macro that on
the surface cannot be converted.
The Lotus macro used a database, template and list of branch names. The
macro itself started with the name of the first branch, copied it to the
template, sucked in the data for that branch and then printed the report.
Then it went down to next name on the list and repeated the process until it
reached the bottom of the list.
In Excel it seems to indicate I have to repeat the steps for each and every
branch on the list and not loop back through a 8 line macro that refers to
the range named list.
Help! - if there is any solution.
 
G

Guest

VBA has several loops to choose from (below are the ones that I can think of
at the moment). If you are looping through a named range, I would lean
towards the For Each..Next loop.

For Each...Next
For...Next
Do...Loop
While...Wend
 
D

Don Guillett

something like
sub doeach()
for each myname in mylist
myname.copy sheets("Template").range("a1")
with sheets("Template")
.getdata for branch
.printout
end with
next myname
end sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top