LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default VBA to count rows in a sheet and increase counter on another sheet then print

Is this because you just want the row number of copies, if so why not just
use

Dim iLastRow As Long
iLastRow = Worksheets("data").End(xlUp).Row
Worksheets("data").PrintOut copies:=iLastRow


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"lgj32" wrote in message
oups.com...
I have a dataset which could have a variable number of rows on a sheet
called "Data", on the first sheet I have a template which shows all the
data for that record and in cell A1 the record number (starts at 1).

I need the Template sheet number to increase by one each time, print
then increase the number and print gain until it reaches the end of the
records on the "data" sheet.

At the moment I am manually typing in the record number and printing,
but there must be a simplier way by using VBA to automate this. I
haven't used macros for years and years so am very rusty can anybody
help?

Thanks



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
WHY DOES COPING FROM SHEET TO SHEET INCREASE SIZE DRAMATICALLY? Jerry Excel Discussion (Misc queries) 0 June 1st 07 05:06 PM
how do i increase the rows in a excel balance sheet? dass New Users to Excel 5 May 18th 07 12:40 PM
how can i increase number of rows beyone 65536 in excel sheet increasing number of rows in excel sheet Excel Discussion (Misc queries) 2 April 28th 05 07:03 AM
How do I get the top 4 rows of a spread sheet to print on each pa. joetut Excel Discussion (Misc queries) 1 December 28th 04 07:12 PM
How increase max # of rows/sheet in excel? JKallen Excel Discussion (Misc queries) 1 December 20th 04 08:31 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"