View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Macro to fill in 1 of 10


Bryan, try the below macro. I am not sure in which cell do you have the PPO
number...I have mentioned that as cell B2. Change to suit your requirement.
Also I assume this is a one paged template which you are trying to print..Try
and feedback

Sub Macro1()
intCopies = InputBox("Number of copies to print")
varPPO = InputBox("Enter the PPO number")
Range("B2") = intPPO
For intTemp = 1 To intCopies
ActiveSheet.PageSetup.RightFooter = intTemp & " of " & intCopies
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1
Next
End Sub

--
If this post helps click Yes
---------------
Jacob Skaria


"Bryan" wrote:

Sorry, I did not know how to word that title. What I need is a macro that
will fill in 1, 2, 3,... of however many the user requires. If there are 10
copies required, then the first page would print out as 1 of 10, the second
as 2 of 10, etc. I also need to fill in the PPO number on each printed
sheet, (same for all of that set). I do this in word, but am unfamiliar with
how to do this in excel. In Word, I use an autoopen macro that pops up
messageboxes for data entry. It then sends to my default printer.

thanx,
Bryan