View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Josh in Tampa Josh in Tampa is offline
external usenet poster
 
Posts: 19
Default Macro Monday Blues

previously, i had a problem with this macro that i put
together. when i originally recorded the macro i did so
with a worksheet of say, 100 records......well, when i ran
the macro on a different worksheet, everything worked
fine, except for the fact that only the second worksheet
had 125 records. after the macro was finished running, i
noticed that work had been done on only the first 100
records of the worksheet......the remaining 25 hadn't
changed.

so......i got some help here in the newsgroups. i
followed several suggestions that i change a handful of
lines in the macro code.......from Range(B1:B100) to Range
("B2:B" & Range("B1").End(xlDown).Row).

well, this was the perfect fix for my problem, or so i
thought.

now i'm stuck with this problem: my worksheet now
consists of some 65,000 records......most of them blank of
course, but nonetheless, when i go to run print jobs,
etc., the printer spits out the first 125 records followed
by sheet after sheet of blank paper (which represent the
65000 or so empty records.)

i can only imagine that the B2:B" & Range("B1).End
(xlDown).Row) line is my problem. is there a way in which
i can change this line so that i'm not stuck with so many
records?

thanks in advance!