ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Automating a Printout (https://www.excelbanter.com/excel-programming/367570-automating-printout.html)

Stella

Automating a Printout
 
Hi all,
I'm using Excel 2002

From Sheet1 I run a Do Until macro and when it stops I want to print Sheet2
automatically [ the print area is already set].

What do I need to add to the macro between *loop* and *end* to achieve this?

Many thanks

Stella





Tom Ogilvy

Automating a Printout
 
Sub Example1()
Dim bFlag as Boolean
Dim cnt as Long
bFlag = False
do
cnt = cnt + 1
if rnd() .995 then
bFlag = True
End if

until bflag = True
Worksheets("sheet2").Printout
msgbox "Number of loops: " & cnt
End Sub

--
Regards,
Tom Ogilvy

"Stella" wrote:

Hi all,
I'm using Excel 2002

From Sheet1 I run a Do Until macro and when it stops I want to print Sheet2
automatically [ the print area is already set].

What do I need to add to the macro between *loop* and *end* to achieve this?

Many thanks

Stella






Stella

Automating a Printout
 
Yeah Right : vous plonquere


"Tom Ogilvy" wrote in message
...
Sub Example1()
Dim bFlag as Boolean
Dim cnt as Long
bFlag = False
do
cnt = cnt + 1
if rnd() .995 then
bFlag = True
End if

until bflag = True
Worksheets("sheet2").Printout
msgbox "Number of loops: " & cnt
End Sub

--
Regards,
Tom Ogilvy

"Stella" wrote:

Hi all,
I'm using Excel 2002

From Sheet1 I run a Do Until macro and when it stops I want to print
Sheet2
automatically [ the print area is already set].

What do I need to add to the macro between *loop* and *end* to achieve
this?

Many thanks

Stella








NickHK

Automating a Printout
 
What is that supposed to mean ?

NickHK

"Stella" wrote in message
...
Yeah Right : vous plonquere


"Tom Ogilvy" wrote in message
...
Sub Example1()
Dim bFlag as Boolean
Dim cnt as Long
bFlag = False
do
cnt = cnt + 1
if rnd() .995 then
bFlag = True
End if

until bflag = True
Worksheets("sheet2").Printout
msgbox "Number of loops: " & cnt
End Sub

--
Regards,
Tom Ogilvy

"Stella" wrote:

Hi all,
I'm using Excel 2002

From Sheet1 I run a Do Until macro and when it stops I want to print
Sheet2
automatically [ the print area is already set].

What do I need to add to the macro between *loop* and *end* to achieve
this?

Many thanks

Stella










Duncan[_5_]

Automating a Printout
 
I think we know who the plonker is stella,

when posting for help, dont spit on the gift horse


Duncan


NickHK wrote:

What is that supposed to mean ?

NickHK

"Stella" wrote in message
...
Yeah Right : vous plonquere


"Tom Ogilvy" wrote in message
...
Sub Example1()
Dim bFlag as Boolean
Dim cnt as Long
bFlag = False
do
cnt = cnt + 1
if rnd() .995 then
bFlag = True
End if

until bflag = True
Worksheets("sheet2").Printout
msgbox "Number of loops: " & cnt
End Sub

--
Regards,
Tom Ogilvy

"Stella" wrote:

Hi all,
I'm using Excel 2002

From Sheet1 I run a Do Until macro and when it stops I want to print
Sheet2
automatically [ the print area is already set].

What do I need to add to the macro between *loop* and *end* to achieve
this?

Many thanks

Stella










All times are GMT +1. The time now is 12:42 AM.

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