printing macro

C

cagreer

built a macro in word to bring data from an excel worksheet. Is there
a way to have word merge stop at a location instead of searching the
full excel sheet. Have used first & last 1 & 50 still goes the
limit.This is being done in 2000 as the people who will use after I am
gone are novices as I am. This is really my last hurdle to this
project.
Thanks to anyone who can speed up this merge.
 
D

Doug Robbins - Word MVP

It is not really clear what you mean by "stop at a location". How would
that location be defined?

Suggesting a modification to your exisiting code would be easier if you
showed us what it was.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
S

SHewes

Something like this might help

Stop = 0
For Each varRow In myXL.Worksheets("File").Cells(1,1).CurrentRegion.Rows
...
stop = stop + 1
if Stop = 100 then
exit for
end if

Next varRow

This stops after processing the first 100 rows ins the sheet.
 

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