Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy of excel file not showing formulal/function in the function b | Excel Discussion (Misc queries) | |||
Excel 2003 spreadsheet prinout disagrees with print preview | Excel Discussion (Misc queries) | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Offset function with nested match function not finding host ss. | Excel Worksheet Functions | |||
Setting a Prinout format for Printout of a page. | Excel Programming |