ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Yet another Lotus macro question (https://www.excelbanter.com/new-users-excel/129524-yet-another-lotus-macro-question.html)

Monty

Yet another Lotus macro question
 
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.

JMB

Yet another Lotus macro question
 
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

"Monty" wrote:

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.


Don Guillett

Yet another Lotus macro question
 
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
--
Don Guillett
SalesAid Software

"Monty" wrote in message
...
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.





All times are GMT +1. The time now is 09:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com