Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 126
Default Excel VBA Coding for Printing

Hello

Could someone help on this?

I like to put an object on an Excel sheet. When I click it it should print a
selected range.

I tried a macro but I could go up to the pre view level only.

Thank You

M Varnendra
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Excel VBA Coding for Printing

Hi Varne

Use one of the one liners here
http://www.rondebruin.nl/print.htm#Liners

Maybe one of the two

Selection.PrintOut
'print only the selection

Range("C1:D5").PrintOut
'print range


--

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


"Varne" wrote in message ...
Hello

Could someone help on this?

I like to put an object on an Excel sheet. When I click it it should print a
selected range.

I tried a macro but I could go up to the pre view level only.

Thank You

M Varnendra

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 126
Default Excel VBA Coding for Printing

Hi Ron

selection.printout copies:=1, preview:=true, collate:=true

leaves with showing preview of the selection on the scree. So I have got to
push the print button to print.

What I like to have is the macro does the printing as well.

Regards
M Varnendra

"Ron de Bruin" wrote:

Hi Varne

Use one of the one liners here
http://www.rondebruin.nl/print.htm#Liners

Maybe one of the two

Selection.PrintOut
'print only the selection

Range("C1:D5").PrintOut
'print range


--

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


"Varne" wrote in message ...
Hello

Could someone help on this?

I like to put an object on an Excel sheet. When I click it it should print a
selected range.

I tried a macro but I could go up to the pre view level only.

Thank You

M Varnendra


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Excel VBA Coding for Printing

Use only

Selection.PrintOut

Or remove this form your code line

preview:=true



--

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


"Varne" wrote in message ...
Hi Ron

selection.printout copies:=1, preview:=true, collate:=true

leaves with showing preview of the selection on the scree. So I have got to
push the print button to print.

What I like to have is the macro does the printing as well.

Regards
M Varnendra

"Ron de Bruin" wrote:

Hi Varne

Use one of the one liners here
http://www.rondebruin.nl/print.htm#Liners

Maybe one of the two

Selection.PrintOut
'print only the selection

Range("C1:D5").PrintOut
'print range


--

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


"Varne" wrote in message ...
Hello

Could someone help on this?

I like to put an object on an Excel sheet. When I click it it should print a
selected range.

I tried a macro but I could go up to the pre view level only.

Thank You

M Varnendra


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 126
Default Excel VBA Coding for Printing

Yes Ron

It works.

Thanks.

M Varnendra

"Ron de Bruin" wrote:

Use only

Selection.PrintOut

Or remove this form your code line

preview:=true



--

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


"Varne" wrote in message ...
Hi Ron

selection.printout copies:=1, preview:=true, collate:=true

leaves with showing preview of the selection on the scree. So I have got to
push the print button to print.

What I like to have is the macro does the printing as well.

Regards
M Varnendra

"Ron de Bruin" wrote:

Hi Varne

Use one of the one liners here
http://www.rondebruin.nl/print.htm#Liners

Maybe one of the two

Selection.PrintOut
'print only the selection

Range("C1:D5").PrintOut
'print range


--

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


"Varne" wrote in message ...
Hello

Could someone help on this?

I like to put an object on an Excel sheet. When I click it it should print a
selected range.

I tried a macro but I could go up to the pre view level only.

Thank You

M Varnendra


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
VBA/Excel help - Coding ComboBoses...... chadtastic Excel Discussion (Misc queries) 2 August 29th 07 09:57 PM
Need Help with Coding a ComboBox in Excel/VBa...... chadtastic[_2_] New Users to Excel 1 August 26th 07 06:54 PM
Can Excel do this with coding? Dan the Man[_2_] Excel Worksheet Functions 6 August 10th 07 03:44 PM
help with coding in excel associates Excel Worksheet Functions 3 June 7th 06 10:41 AM
Simple coding in Excel craigs Excel Discussion (Misc queries) 1 January 17th 06 07:48 PM


All times are GMT +1. The time now is 02:18 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"