Print all data from list on seperate form

K

Kevin

I'm pretty new with Excel macros & have no experience
with VB. Is there a way that I can dump some of the data
(columns) from one worksheet into a form and print that,
then have it automatically move to the next record and
print that. Right now, I'm typing in the customer's name
and using VLOOKUP functions to dump all of the data for
one record. I print that, then have to type the
customer's name to print the next record. There are
about 200 customers, so this takes quite a while.

Thanks,
Kevin
 
R

Ron de Bruin

Try this

Cell a1 in the sheet "form" is the cell with the customer's name
sheet "data" have the lookup information with in column A the customer's names

Sub test()
Dim cell As Range
For Each cell In Sheets("data").Range("a1:a10")
Sheets("form").Range("A1").Value = cell.Value
Sheets("form").PrintOut
Next
End Sub

Change Range("a1:a10")
to Range("a1:a200") if it is working for you
 

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