Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default Prinout function

Hello,

Trying to get a grasp of the VB stuff behind a spreadsheet. I am trying to
print the current spreadsheet so am trying to use the printout function.

I think I am using the [PrToFileName] property incorrectly but I do not know
what it expects. An example of what I have tried is:
me.PrintOut (,,,,,TRUE,,"U:\weeklyreport")

How do you define the file name to print the current spreadsheet to?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Prinout function


Hello Chris,

You should use the named arguments when calling the function...

me.PrintOut PrintToFile:="True", PrToFileName:="C:\My Documents\My
File.xls"

Just change the print to file name string to include the path (if
different from the current directory) and the file name.

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=497789

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Prinout function


Hello Chris,

You should use the named arguments when calling the function...

me.PrintOut PrintToFile:="True", PrToFileName:="C:\My Documents\My
File.xls"

Just change the print to file name string to include the path (if
different from the current directory) and the file name.

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=497789

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default Prinout function

Thankyou for your help Leith,

Do you what format the output file is? I save it as an Excel file, but it
brings up warnings and is in an unrecorgnisable bunch or jargon.
If I do not save it as a xls, it is an unattributed file, and it doens't
work as a .doc either.

I wish to save it as a excel file.

Any tricks?

"Leith Ross" wrote:


Hello Chris,

You should use the named arguments when calling the function...

me.PrintOut PrintToFile:="True", PrToFileName:="C:\My Documents\My
File.xls"

Just change the print to file name string to include the path (if
different from the current directory) and the file name.

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=497789


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 126
Default Prinout function

Chris

Try turning on your macro recorder, then printing or saving the file as you
wish.
Turn off the recorder and look at the code.

"Chris" wrote:

Thankyou for your help Leith,

Do you what format the output file is? I save it as an Excel file, but it
brings up warnings and is in an unrecorgnisable bunch or jargon.
If I do not save it as a xls, it is an unattributed file, and it doens't
work as a .doc either.

I wish to save it as a excel file.

Any tricks?

"Leith Ross" wrote:


Hello Chris,

You should use the named arguments when calling the function...

me.PrintOut PrintToFile:="True", PrToFileName:="C:\My Documents\My
File.xls"

Just change the print to file name string to include the path (if
different from the current directory) and the file name.

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=497789


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
copy of excel file not showing formulal/function in the function b oaallam Excel Discussion (Misc queries) 4 September 6th 07 01:20 PM
Excel 2003 spreadsheet prinout disagrees with print preview Marion Douglas Excel Discussion (Misc queries) 5 February 22nd 07 01:03 AM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Setting a Prinout format for Printout of a page. forunner101-3 Excel Programming 0 July 28th 05 09:58 PM


All times are GMT +1. The time now is 11:43 PM.

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"