ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Printing on a network (https://www.excelbanter.com/excel-discussion-misc-queries/204120-printing-network.html)

leerem

Printing on a network
 
Hi everyone:

I need to be able to print a selection (worksheet) to a network printer.
However I am not goiing to be able to identify the printer within the code.
Is there away of printing the selected area wherby the user then selects the
required network printer in their office.

Regards
Lee

Jim Thomlinson

Printing on a network
 
Try this line of code...

Application.Dialogs(xlDialogPrinterSetup).Show
--
HTH...

Jim Thomlinson


"leerem" wrote:

Hi everyone:

I need to be able to print a selection (worksheet) to a network printer.
However I am not goiing to be able to identify the printer within the code.
Is there away of printing the selected area wherby the user then selects the
required network printer in their office.

Regards
Lee


leerem

Printing on a network
 
many thanks for that: now I'm perplexed as to how to include this within the
code, I know its a cheek but could you please assist....

Regards

Lee

"leerem" wrote:

Hi everyone:

I need to be able to print a selection (worksheet) to a network printer.
However I am not goiing to be able to identify the printer within the code.
Is there away of printing the selected area wherby the user then selects the
required network printer in their office.

Regards
Lee


Jim Thomlinson

Printing on a network
 
Depends on what you want to do. Did you want the user to be presented with
the option any time they choose to print this sheet or did you want to run a
macro that includes printing the sheet as part of the routine. Do you have
any existing code that you are working with???

Option 1 - Any time they print. We will catch the event wheby the user is
trying to print this sheet and we will allow them to select the printer.

Option 2 - The user invokes a macro with a command button or such and as
part of that routine we define the printer and print the page.
--
HTH...

Jim Thomlinson


"leerem" wrote:

many thanks for that: now I'm perplexed as to how to include this within the
code, I know its a cheek but could you please assist....

Regards

Lee

"leerem" wrote:

Hi everyone:

I need to be able to print a selection (worksheet) to a network printer.
However I am not goiing to be able to identify the printer within the code.
Is there away of printing the selected area wherby the user then selects the
required network printer in their office.

Regards
Lee


leerem

Printing on a network
 
Jim,

The basic code I'm using is somthing like as follows;

ActiveSheet.PageSetup.PrintArea = "$A$1:$U$49"
Application.ActivePrinter = "Admin Colour on Ne05:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"Admin Colour on Ne05:", Collate:=True
Windows("Kpiblank-Nights.xls").Activate

Wherby "Admin Color on Ne05:" would be the network printer

If possble it would be preferable to use your Option 2

Regards



"Jim Thomlinson" wrote:

Depends on what you want to do. Did you want the user to be presented with
the option any time they choose to print this sheet or did you want to run a
macro that includes printing the sheet as part of the routine. Do you have
any existing code that you are working with???

Option 1 - Any time they print. We will catch the event wheby the user is
trying to print this sheet and we will allow them to select the printer.

Option 2 - The user invokes a macro with a command button or such and as
part of that routine we define the printer and print the page.
--
HTH...

Jim Thomlinson


"leerem" wrote:

many thanks for that: now I'm perplexed as to how to include this within the
code, I know its a cheek but could you please assist....

Regards

Lee

"leerem" wrote:

Hi everyone:

I need to be able to print a selection (worksheet) to a network printer.
However I am not goiing to be able to identify the printer within the code.
Is there away of printing the selected area wherby the user then selects the
required network printer in their office.

Regards
Lee


Jim Thomlinson

Printing on a network
 
Try this...

ActiveSheet.PageSetup.PrintArea = "$A$1:$U$49"
Application.Dialogs(xlDialogPrinterSetup).Show
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Windows("Kpiblank-Nights.xls").Activate

--
HTH...

Jim Thomlinson


"leerem" wrote:

Jim,

The basic code I'm using is somthing like as follows;

ActiveSheet.PageSetup.PrintArea = "$A$1:$U$49"
Application.ActivePrinter = "Admin Colour on Ne05:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"Admin Colour on Ne05:", Collate:=True
Windows("Kpiblank-Nights.xls").Activate

Wherby "Admin Color on Ne05:" would be the network printer

If possble it would be preferable to use your Option 2

Regards



"Jim Thomlinson" wrote:

Depends on what you want to do. Did you want the user to be presented with
the option any time they choose to print this sheet or did you want to run a
macro that includes printing the sheet as part of the routine. Do you have
any existing code that you are working with???

Option 1 - Any time they print. We will catch the event wheby the user is
trying to print this sheet and we will allow them to select the printer.

Option 2 - The user invokes a macro with a command button or such and as
part of that routine we define the printer and print the page.
--
HTH...

Jim Thomlinson


"leerem" wrote:

many thanks for that: now I'm perplexed as to how to include this within the
code, I know its a cheek but could you please assist....

Regards

Lee

"leerem" wrote:

Hi everyone:

I need to be able to print a selection (worksheet) to a network printer.
However I am not goiing to be able to identify the printer within the code.
Is there away of printing the selected area wherby the user then selects the
required network printer in their office.

Regards
Lee


leerem

Printing on a network
 
Many thanks Jim,

It looks too simple now I see it,
I'll try it out on Monday
Cheers

Lee

"Jim Thomlinson" wrote:

Try this...

ActiveSheet.PageSetup.PrintArea = "$A$1:$U$49"
Application.Dialogs(xlDialogPrinterSetup).Show
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Windows("Kpiblank-Nights.xls").Activate

--
HTH...

Jim Thomlinson


"leerem" wrote:

Jim,

The basic code I'm using is somthing like as follows;

ActiveSheet.PageSetup.PrintArea = "$A$1:$U$49"
Application.ActivePrinter = "Admin Colour on Ne05:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"Admin Colour on Ne05:", Collate:=True
Windows("Kpiblank-Nights.xls").Activate

Wherby "Admin Color on Ne05:" would be the network printer

If possble it would be preferable to use your Option 2

Regards



"Jim Thomlinson" wrote:

Depends on what you want to do. Did you want the user to be presented with
the option any time they choose to print this sheet or did you want to run a
macro that includes printing the sheet as part of the routine. Do you have
any existing code that you are working with???

Option 1 - Any time they print. We will catch the event wheby the user is
trying to print this sheet and we will allow them to select the printer.

Option 2 - The user invokes a macro with a command button or such and as
part of that routine we define the printer and print the page.
--
HTH...

Jim Thomlinson


"leerem" wrote:

many thanks for that: now I'm perplexed as to how to include this within the
code, I know its a cheek but could you please assist....

Regards

Lee

"leerem" wrote:

Hi everyone:

I need to be able to print a selection (worksheet) to a network printer.
However I am not goiing to be able to identify the printer within the code.
Is there away of printing the selected area wherby the user then selects the
required network printer in their office.

Regards
Lee



All times are GMT +1. The time now is 01:35 AM.

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