Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Newbie: How to Print by VBA a Single Page in a Worksheet

I want to create a VBA snippet that will only print a single named page in a
worksheet to a txt file called "c:\info\excel.txt".

How is that done?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Newbie: How to Print by VBA a Single Page in a Worksheet

One way is to copy the sheet to a new workbook and save it from there, then
close that workbook:

Option Explicit
Sub testme01()

ActiveSheet.Copy 'to a new workbook

With ActiveWorkbook
.SaveAs Filename:="c:\info\excel.txt", FileFormat:=xlText
.Close savechanges:=False
End With

End Sub



"L.A. Lawyer" wrote:

I want to create a VBA snippet that will only print a single named page in a
worksheet to a txt file called "c:\info\excel.txt".

How is that done?


--

Dave Peterson

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
A single Page print for key items jeffkeef Excel Discussion (Misc queries) 1 May 28th 10 03:34 PM
how do you print single page multiply times with increasing page . aliasmith Excel Worksheet Functions 2 September 26th 08 12:30 AM
Can you print separate worksheet on a single page? LisaVH Excel Discussion (Misc queries) 3 November 2nd 06 08:17 PM
Print correct Page X of Y when printing single worksheet dbarrett44 Excel Discussion (Misc queries) 3 April 14th 06 03:34 AM
Converting a muliple page worksheet to a single page worksheet [email protected] Excel Discussion (Misc queries) 2 June 30th 05 09:40 PM


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