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: 1
Default print and save a single sheet from a workbook using a commandbutt.

Hi all, i would like to be able to save a single sheet from a workbook using
a command_button to a prealocated folder on a harddrive. at the moment it is
saving the whole workbook. i just want to save the sheet. (some code i have)

Private Sub CommandButton1_Click()
Dim namesheet

Sheet1.Range("B1").Value = Sheet7.Range("I11").Value

Sheet8.Range("I11").Value = Sheet1.Range("B1").Value + 1

Sheet1.Range("B1").Value = Sheet7.Range("I11").Value

Sheet7.Range("I11").Value = Sheet8.Range("I11").Value

namesheet = " - " & Sheet8.Range("I11").Value

Sheet7.SaveAs Sheet1.Range("B2").Value & ".xls"

Sheet8.SaveAs Sheet1.Range("B3").Value & namesheet & ".xls"

Sheet8.SaveAs Sheet1.Range("B2").Value & namesheet & ".xls"

Sheet8.PrintPreview

End Sub

i'm new at this so any help would be great.

 
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
Macro to save Single Page to another workbook Jenny B. Excel Discussion (Misc queries) 2 January 3rd 08 10:02 PM
How do I save a single spreadsheet in a workbook in excel Vic Fourie Excel Worksheet Functions 1 July 15th 06 07:56 AM
Save a single sheet from a workbook JAMES T. Excel Discussion (Misc queries) 2 January 25th 05 02:16 PM
is it possible to use F9 to manually calculate in a single sheet or single workbook? Hersbt Excel Discussion (Misc queries) 2 December 29th 04 04:42 PM
Disable Print Button In a Single Workbook Hambone Excel Programming 0 January 31st 04 12:31 AM


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