Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
print and save a single sheet from a workbook using a commandbutt.
hi, try out the following ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True or if you want to print some selective part of the page then use for example: Range("B9:M12").Select Selection.PrintOut Copies:=1, Collate:=True sujata -- sujata_ghosh ------------------------------------------------------------------------ sujata_ghosh's Profile: http://www.excelforum.com/member.php...o&userid=16432 View this thread: http://www.excelforum.com/showthread...hreadid=277941 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to save Single Page to another workbook | Excel Discussion (Misc queries) | |||
How do I save a single spreadsheet in a workbook in excel | Excel Worksheet Functions | |||
Save a single sheet from a workbook | Excel Discussion (Misc queries) | |||
is it possible to use F9 to manually calculate in a single sheet or single workbook? | Excel Discussion (Misc queries) | |||
Disable Print Button In a Single Workbook | Excel Programming |