Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
print 20 cells with a command button
I received a few suggestions but the gave me errors.
I would like to create a button on a sheet to print C31 to C50 when I press on it. I've only one sheet called MTI. I'd really like to make this work. Thank you if you can help me. Ron Binette |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
print 20 cells with a command button
hi
post the code you are using. regards FSt1 " wrote: I received a few suggestions but the gave me errors. I would like to create a button on a sheet to print C31 to C50 when I press on it. I've only one sheet called MTI. I'd really like to make this work. Thank you if you can help me. Ron Binette |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
print 20 cells with a command button
Sub Print_Range()
Sheets("MTI").PageSetup.PrintArea = "$C$31:$C$50" ActiveWindow.SelectedSheets.PrintPreview 'Change PrintPreview to PrintOut for printing End Sub I added the sheet name just in case you ever insert another sheet. Gord Dibben MS Excel MVP On Sat, 2 Feb 2008 18:39:29 -0800 (PST), wrote: I received a few suggestions but the gave me errors. I would like to create a button on a sheet to print C31 to C50 when I press on it. I've only one sheet called MTI. I'd really like to make this work. Thank you if you can help me. Ron Binette |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
print 20 cells with a command button
On Feb 2, 10:19*pm, Gord Dibben <gorddibbATshawDOTca wrote:
Sub Print_Range() * * * *Sheets("MTI").PageSetup.PrintArea = "$C$31:$C$50" * * * * * * *ActiveWindow.SelectedSheets.PrintPreview * * * 'Change PrintPreview to PrintOut for printing End Sub I added the sheet name just in case you ever insert another sheet. Gord Dibben *MS Excel MVP On Sat, 2 Feb 2008 18:39:29 -0800 (PST), wrote: I received a few suggestions but the gave me errors. I would like to create a button on a sheet to print C31 to C50 when I press on it. I've only one sheet called MTI. I'd really like to make this work. Thank you if you can help me. Ron Binette- Hide quoted text - - Show quoted text - I've tried that and I get this compile error. This is how I entered it Private Sub CommandButton1_Click() Sub Print_Range() Sheets("MTI").PageSetup.PrintArea = "$C$31:$C$50" ActiveWindow.SelectedSheets.PrintOut 'Change PrintPreview to PrintOut for printing End Sub End Sub What am I doing wrong? Thank you |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
print 20 cells with a command button
Delete:
Sub Print_Range() and one End Sub try again.... skrev i melding ... On Feb 2, 10:19 pm, Gord Dibben <gorddibbATshawDOTca wrote: Sub Print_Range() Sheets("MTI").PageSetup.PrintArea = "$C$31:$C$50" ActiveWindow.SelectedSheets.PrintPreview 'Change PrintPreview to PrintOut for printing End Sub I added the sheet name just in case you ever insert another sheet. Gord Dibben MS Excel MVP On Sat, 2 Feb 2008 18:39:29 -0800 (PST), wrote: I received a few suggestions but the gave me errors. I would like to create a button on a sheet to print C31 to C50 when I press on it. I've only one sheet called MTI. I'd really like to make this work. Thank you if you can help me. Ron Binette- Hide quoted text - - Show quoted text - I've tried that and I get this compile error. This is how I entered it Private Sub CommandButton1_Click() Sub Print_Range() Sheets("MTI").PageSetup.PrintArea = "$C$31:$C$50" ActiveWindow.SelectedSheets.PrintOut 'Change PrintPreview to PrintOut for printing End Sub End Sub What am I doing wrong? Thank you |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
print 20 cells with a command button
Thanks for jumping in.
Wouldn't change a word of your reply. Gord On Sun, 3 Feb 2008 06:44:40 +0100, "DS-NTE" wrote: Delete: Sub Print_Range() and one End Sub try again.... skrev i melding ... On Feb 2, 10:19 pm, Gord Dibben <gorddibbATshawDOTca wrote: Sub Print_Range() Sheets("MTI").PageSetup.PrintArea = "$C$31:$C$50" ActiveWindow.SelectedSheets.PrintPreview 'Change PrintPreview to PrintOut for printing End Sub I added the sheet name just in case you ever insert another sheet. Gord Dibben MS Excel MVP On Sat, 2 Feb 2008 18:39:29 -0800 (PST), wrote: I received a few suggestions but the gave me errors. I would like to create a button on a sheet to print C31 to C50 when I press on it. I've only one sheet called MTI. I'd really like to make this work. Thank you if you can help me. Ron Binette- Hide quoted text - - Show quoted text - I've tried that and I get this compile error. This is how I entered it Private Sub CommandButton1_Click() Sub Print_Range() Sheets("MTI").PageSetup.PrintArea = "$C$31:$C$50" ActiveWindow.SelectedSheets.PrintOut 'Change PrintPreview to PrintOut for printing End Sub End Sub What am I doing wrong? Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Command Button - Macro to print to pdf, then send pdf to email. | Excel Discussion (Misc queries) | |||
Print from Command Button Range | Excel Discussion (Misc queries) | |||
command button print | Excel Discussion (Misc queries) | |||
command button in excel will move when print. | Excel Discussion (Misc queries) | |||
How do I setup a print command button in excel 2003 | New Users to Excel |