LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Printing and saving file.

Hi,

Can someone help me. I have used the article on "GetSaveAsFilename -
Save as .prn - file not writing" and written the following code:

varFileName = Application.GetSaveAsFilename("Statement For SRN-" &
Master.SRN & "#Date-" & Format(Date, "yyyymmdd") & ".prn", _
"Space Delimited Text (*.prn), *.prn")

If varFileName = False Then
MsgBox "Problems getting filename for saving the statement"
Exit Sub
End If

ActiveWindow.SelectedSheets.PrintOut To:=intPageTo
ActiveWorkbook.SaveAs FileName:=varFileName
ActiveWindow.Close False


Everything is fine. The only problem is that this process sshould be
repeated for about 500 employees. So if the above code is used then
the user has to save the file 500 times. Is there any way this process
can be automated. What I want is that the statement sheet should be
printed as well as save as a space delimited text that is *.prn.

Thanks in advance
 
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
Saving Excel 2007 file in 2003 creates very large file Jon Pearce Excel Discussion (Misc queries) 2 July 16th 09 07:20 PM
saving printing settings in excel 2007 Judy Excel Discussion (Misc queries) 0 July 28th 08 10:51 PM
Printing and saving problems Andrew H Excel Discussion (Misc queries) 1 August 7th 07 07:53 PM
How do I stop Excel 2000 from saving file history from file that . Cathy Excel Discussion (Misc queries) 0 March 29th 05 03:27 PM
macro to automatically check spelling before printing and before saving dgb Excel Programming 0 September 24th 03 12:53 PM


All times are GMT +1. The time now is 09:26 AM.

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

About Us

"It's about Microsoft Excel"