Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro to print selection

I am trying to creat a macro to print only a selection of a spreadsheet that
has data, however, everytime I create it all goes well. Then I run it and it
prints the entire spreadsheet (4 pages). Can anyone help me? Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Macro to print selection

Post your code...
--
HTH...

Jim Thomlinson


" wrote:

I am trying to creat a macro to print only a selection of a spreadsheet that
has data, however, everytime I create it all goes well. Then I run it and it
prints the entire spreadsheet (4 pages). Can anyone help me? Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro to print selection

Range("B6:B7").Select
Range(Selection, Selection.End(xlDown)).Select
Range("B6:H13").Select
Selection.PrintOut Copies:=1, Collate:=True
Range("B6").Select

"Jim Thomlinson" wrote:

Post your code...
--
HTH...

Jim Thomlinson


" wrote:

I am trying to creat a macro to print only a selection of a spreadsheet that
has data, however, everytime I create it all goes well. Then I run it and it
prints the entire spreadsheet (4 pages). Can anyone help me? Thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Macro to print selection

Code:
selection.Printout

Manual:
or under the file menu, set the printarea

or when you go to print, choose selection in the dialog

--
Regards,
Tom Ogilvy


" wrote:

I am trying to creat a macro to print only a selection of a spreadsheet that
has data, however, everytime I create it all goes well. Then I run it and it
prints the entire spreadsheet (4 pages). Can anyone help me? Thanks

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro to print selection

This is my code. I have selection.printout and i have tried clearing and
creating a print area - but that didn't work either.

Range("B6:B7").Select
Range(Selection, Selection.End(xlDown)).Select
Range("B6:H13").Select
Selection.PrintOut Copies:=1, Collate:=True
Range("B6").Select

"Tom Ogilvy" wrote:

Code:
selection.Printout

Manual:
or under the file menu, set the printarea

or when you go to print, choose selection in the dialog

--
Regards,
Tom Ogilvy


" wrote:

I am trying to creat a macro to print only a selection of a spreadsheet that
has data, however, everytime I create it all goes well. Then I run it and it
prints the entire spreadsheet (4 pages). Can anyone help me? Thanks



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Macro to print selection

Both setting a printarea and selection.printout work. So your statements
make no sense. The only problem I could see is if you have merged cells and
when you select you are actually selecting more than you think.

--
Regards,
Tom Ogilvy


" wrote:

This is my code. I have selection.printout and i have tried clearing and
creating a print area - but that didn't work either.

Range("B6:B7").Select
Range(Selection, Selection.End(xlDown)).Select
Range("B6:H13").Select
Selection.PrintOut Copies:=1, Collate:=True
Range("B6").Select

"Tom Ogilvy" wrote:

Code:
selection.Printout

Manual:
or under the file menu, set the printarea

or when you go to print, choose selection in the dialog

--
Regards,
Tom Ogilvy


" wrote:

I am trying to creat a macro to print only a selection of a spreadsheet that
has data, however, everytime I create it all goes well. Then I run it and it
prints the entire spreadsheet (4 pages). Can anyone help me? Thanks

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Macro to print selection

I don't see your problem but I am a little confused as to which range you
want to print since you select 3 different ranges in your macro. Ultimatley
you will be printing B6 through H13 since that is your last selection prior
to the selection print...

The entire thing could be done with just this in that case...
Range("B6:H13").PrintOut

I am guessing that is not what you intend to print however? Describe what
you would like to print and we can give you a hand...
--
HTH...

Jim Thomlinson


" wrote:

Range("B6:B7").Select
Range(Selection, Selection.End(xlDown)).Select
Range("B6:H13").Select
Selection.PrintOut Copies:=1, Collate:=True
Range("B6").Select

"Jim Thomlinson" wrote:

Post your code...
--
HTH...

Jim Thomlinson


" wrote:

I am trying to creat a macro to print only a selection of a spreadsheet that
has data, however, everytime I create it all goes well. Then I run it and it
prints the entire spreadsheet (4 pages). Can anyone help me? Thanks

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro to print selection

I don't understand it either. Like I said, when I create it all is fine and
it prints only the selection. but when I run it - it prints all 4 pages.
I'm stumped....

"Tom Ogilvy" wrote:

Both setting a printarea and selection.printout work. So your statements
make no sense. The only problem I could see is if you have merged cells and
when you select you are actually selecting more than you think.

--
Regards,
Tom Ogilvy


" wrote:

This is my code. I have selection.printout and i have tried clearing and
creating a print area - but that didn't work either.

Range("B6:B7").Select
Range(Selection, Selection.End(xlDown)).Select
Range("B6:H13").Select
Selection.PrintOut Copies:=1, Collate:=True
Range("B6").Select

"Tom Ogilvy" wrote:

Code:
selection.Printout

Manual:
or under the file menu, set the printarea

or when you go to print, choose selection in the dialog

--
Regards,
Tom Ogilvy


" wrote:

I am trying to creat a macro to print only a selection of a spreadsheet that
has data, however, everytime I create it all goes well. Then I run it and it
prints the entire spreadsheet (4 pages). Can anyone help me? Thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to include more cells for selection to print Driftwood Excel Discussion (Misc queries) 2 November 19th 08 08:54 PM
Print dialog box selection macro I think I need to rephrase the question Excel Discussion (Misc queries) 2 November 4th 07 11:31 PM
"Print Selection" doesn't print beyond automatic page breaks Andre Excel Discussion (Misc queries) 3 October 30th 06 09:30 PM
How can I print frozen panes to appear above print selection in Ex Snr Franco Excel Discussion (Misc queries) 1 April 2nd 06 03:06 PM
How do I print a selection of cells using a macro? gussuffert Excel Programming 3 April 4th 05 09:07 PM


All times are GMT +1. The time now is 08:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"