ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   macro to increase a value and print (https://www.excelbanter.com/excel-programming/387088-macro-increase-value-print.html)

Ripple919

macro to increase a value and print
 
I need to create a macro that increases the value of a cell in a worksheet
and then prints the worksheet. it needs to do this repeatedly until the value
of the cell I'm changing gets to a certain number. Any suggestions?

Ron de Bruin

macro to increase a value and print
 
See
http://www.rondebruin.nl/print.htm#number

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Ripple919" wrote in message ...
I need to create a macro that increases the value of a cell in a worksheet
and then prints the worksheet. it needs to do this repeatedly until the value
of the cell I'm changing gets to a certain number. Any suggestions?


Gord Dibben

macro to increase a value and print
 
Try this this for a start point.

Sub Sheet_Print()
Dim i As Long
Application.ScreenUpdating = False
For i = 1 To 10
With ActiveSheet
.Range("A1").Value = Value + i
.PrintOut
'.PrintOut preview:=True
End With
Next i
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP


On Mon, 9 Apr 2007 11:18:01 -0700, Ripple919
wrote:

I need to create a macro that increases the value of a cell in a worksheet
and then prints the worksheet. it needs to do this repeatedly until the value
of the cell I'm changing gets to a certain number. Any suggestions?




All times are GMT +1. The time now is 11:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com