Edit Cell & Print Loop (1 Viewer)

Dragonchaser

Registered User.
Local time
Today, 00:06
Joined
May 15, 2007
Messages
31
Hey AP,

Getting upset with this one as it's probably extremely simple, and I'm just missing something. :rolleyes:

I'm made a Click box Assigned to a macro that simply needs to add 1 to the number in the cell (always an Integer>0), then print the sheet, add 1 then print sheet again. It should do this a user specified number of times.
Here's my code:

Sub PrintForms()

Dim Serial As Integer
Dim Amount As Integer
Dim A As Integer

Amount = InputBox("Please enter the number of Meter Runs", "Number of Meter Runs")

Serial = Cell("C8")

For A = 0 To Amount
Serial = Serial + 1
ActiveSheet.PrintOut
Next A

End Sub


I'm a missing quotes or something or is this the wrong way to go about this all together? :confused:

Any aid you could give would be excellent

Thanks again,

DC
 
Last edited:

unmarkedhelicopter

Registered User.
Local time
Today, 07:06
Joined
Apr 23, 2007
Messages
177
What is "Cell("C8")" supposed to be ?
I'd say you should use "Serial = Range("C8").value"
and if you want the number printed out incrementing each time you will have to update it in the loop with "Range("C8").value = Serial"

As an aside; don't use integers, use longs. Integers are not recomended, they are internally converted to longs before use so you get none of the memory savings and it takes longer due to the conversion.
 

Users who are viewing this thread

Top Bottom