![]() |
|
|||||||
|
|
|
|
|
|
I need to know how to create a macro so that when i press a command button a wrksheet will print two copies of the cell range.
Thanks...
|
![]() |
|
|
Thread Tools |
|
#1
|
|||
|
|||
|
I need to know how to create a macro so that when i press a command button a wrksheet will print two copies of the cell range.
Thanks |
|
#2
|
||||||||||||
|
||||||||||||
|
Have you selected a spreadsheet program to do this in yet?
__________________
My System: Tim
|
|
#3
|
|||
|
|||
|
yeh sorry its in excel
|
|
#4
|
|||
|
|||
|
Any particular version of excel? I hate to be pushy but.
|
|
#5
|
|||
|
|||
|
well at home im usin 2007, but im out atm so im usin 2003 where i am atm
|
|
#6
|
|||
|
|||
|
okay, this ought to work on both.
Sub PrintRange() ' ' PrintRange Macro ' This will print 2 copies of a worksheet preselected range ' Application.ScreenUpdating = False Sheets("Sheet1").Select ActiveSheet.Unprotect ActiveWindow.Range("C5:D17").PrintOut Copies:=2 Application.ScreenUpdating = True End Sub If you have trouble creating a button or hooking the code to it then say and we'll talk you through it. |
|
#7
|
|||
|
|||
|
Sorry for a delayed response. Thanks I will try this and will give you feedback as soon as possible :)
|
|
#8
|
|||
|
|||
|
What's in that example is fairly random, I've no idea whether you've multiple sheets or you've protected areas or you want to end up somewhere different after the macro's run than where you were when you clicked it. Or whether your worksheet range is based on labels or on hard cell addresses. I suggest you play with the syntax a bit, the line that does all the work is
ActiveWindow.Range("C5:D17").PrintOut Copies:=2 and you can change that to your heart's content. |
|
#9
|
|||
|
|||
|
Thanks for the help guys... I have done it now.
|
![]() |
|
| Bookmarks |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Macro in Excel to print select cells in a worksheet | NothingButProblems | Office Suites & Applications | 0 | 16th Jun 2009 17:12 |
| Need Macro to Populate Excel | moneybug939 | Office Suites & Applications | 0 | 9th Jun 2009 03:12 |
| Excel 2003 SP3 Workbook Macro Help | gramble | Office Suites & Applications | 0 | 4th Jun 2009 02:24 |
| Macro to Toggle Highlighter in Search-Replace Box | shahid | Office Suites & Applications | 0 | 2nd Jun 2009 14:02 |
| Not able to take a Print Out | Imanuel4u | Digital Imaging & Printers | 1 | 22nd Dec 2008 02:46 |
| Thread Tools | |
|
|