Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Print code?????
Can anybody give me the VBA code for a command button that will prin the active worksheet and also give the user the option to select ho many -- Chris Watso ----------------------------------------------------------------------- Chris Watson's Profile: http://www.excelforum.com/member.php...nfo&userid=470 View this thread: http://www.excelforum.com/showthread.php?threadid=52564 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Print code?????
very simplistic
Dim i As Integer i = InputBox("How many copies") ActiveSheet.PrintOut copies:=i "Chris Watson" wrote: Can anybody give me the VBA code for a command button that will print the active worksheet and also give the user the option to select how many. -- Chris Watson ------------------------------------------------------------------------ Chris Watson's Profile: http://www.excelforum.com/member.php...fo&userid=4700 View this thread: http://www.excelforum.com/showthread...hreadid=525646 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Print code?????
Create the button and associate it with this code Sub Print_Sheet() Dim Message, Title, Default, MyValue Message = "Enter Number Of Copies To Print" ' Set prompt. Title = "Print" ' Set title. Default = "1" ' Set default. MyValue = InputBox(Message, Title, Default) If Not IsNumeric(MyValue) Then MsgBox "Please enter a vilid number", vbInformation GoTo NoPrinting End If ActiveWindow.SelectedSheets.PrintOut Copies:=MyValue NoPrinting: End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Print Code | Excel Discussion (Misc queries) | |||
Code before Print but not Print Preview | Excel Programming | |||
Need Code To Print From Code Modules | Excel Programming | |||
Need Code To Print From Code Modules | Excel Programming | |||
Need print code please | Excel Programming |