|
|
|||||||
| Register | iSpy | Downloads | New Posts | Donate | Unanswered Posts | Member List | Search |
|
Computer Juice raffle
- Win PC hardware of your choice worth £500 / 680 / $1000 -
Enter HERE!
|
|
|
Computer Juice - Forums - Print Macro |
|
|
|
LinkBack | Thread Tools |
|
#
1
|
||||
|
||||
Print Macro
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
|
||||||||||||
|
||||||||||||
Print Macro
Have you selected a spreadsheet program to do this in yet?
__________________
My System: Tim
Want your system info in your signature?
|
|
#
3
|
||||
|
||||
Print Macro
yeh sorry its in excel
|
|
#
4
|
||||||||||||
|
||||||||||||
Print Macro
Any particular version of excel? I hate to be pushy but.
__________________
My System: Tim
Want your system info in your signature?
|
|
#
5
|
||||
|
||||
Print Macro
well at home im usin 2007, but im out atm so im usin 2003 where i am atm
|
|
#
6
|
||||||||||||
|
||||||||||||
Print Macro
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. My System: Tim
Want your system info in your signature?
|
|
#
7
|
||||
|
||||
Print Macro
Sorry for a delayed response. Thanks I will try this and will give you feedback as soon as possible :)
|
|
#
8
|
||||||||||||
|
||||||||||||
Print Macro
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. My System: Tim
Want your system info in your signature?
|
|
#
9
|
||||
|
||||
Print Macro
Thanks for the help guys... I have done it now.
|
|
|
| Thread Tools | |
Show Printable Version
Email this Page
|
|
|
|
Powered by vBulletin® Copyright ©2000 - 2008 Jelsoft Enterprises Ltd.
SEO by vBSEO ©2007, Crawlability, Inc.
|