Creating a print-macro that'll only print page 1?

Hi,

I have a spreadsheet that contains multiple sheets. I want to add a 
button that runs a macro, which only prints page 1 on the first sheet 
(called Scorekort).

The "Scorekort" sheet contains 13 pages in total, but I only want to 
print the first page.

Any ideas for this macro?

Anders
0
no7382 (6)
5/21/2011 8:16:24 AM
excel 39879 articles. 2 followers. Follow

2 Replies
660 Views

Similar Articles

[PageSpeed] 29

hi,

Sub Macro1()
Sheets("Scorekort").PrintOut From:=1, To:=1, Copies:=1, Preview:=True, Collate:=True
End Sub

if you don't want a print preview, Preview:=False


-- 
isabelle


Le 2011-05-21 04:16, Anders M a �crit :
> Hi,
>
> I have a spreadsheet that contains multiple sheets. I want to add a button that runs a macro, which only prints page 1 on the first sheet (called Scorekort).
>
> The "Scorekort" sheet contains 13 pages in total, but I only want to print the first page.
>
> Any ideas for this macro?
>
> Anders
0
isabelle
5/21/2011 2:21:20 PM
Superb!

Thank you

Den 21-05-2011 16:21, isabelle skrev:
> hi,
>
> Sub Macro1()
> Sheets("Scorekort").PrintOut From:=1, To:=1, Copies:=1, Preview:=True,
> Collate:=True
> End Sub
>
> if you don't want a print preview, Preview:=False
>
>

0
no7382 (6)
5/24/2011 8:26:41 AM
Reply:

Similar Artilces:

create a roster
How can you create a weekly roster in which functions can be assigned to more than 10 people. The roster should be updatable, so that when holidays and days off are marked on the weekly roster they will be taken account of it future rosters. ...

VBA code to pause before printing
I have a workbook containing several sheets. In one of them there's a list of organizational units. I've written a macro that grabs selected unit identifiers from the sheet "F Units", copies them one by one to a cell called Filter, and prints sheets with diagrams and statistics for each of the units. The procedure sometimes partly fails, as the filter isn't applied to the statistics sheet. I guess this happens because the sheets are printed before Excel finishes recalculating. If this is true, I believe I can prevent the error by adding a "Wait" command,...

Poor Printing Performance
Hi everyone, I have a VB program that uses Excel automation to print our a variable number of Excel files to a network printer. Sometimes there can be 50-100 Excel sheets that will be sent to the print queue to be printed. That works very well, the issue comes about during the printing process. The printer will print 6 of sheets, will pause for a minute or two, then print 6 more etc.... This occurs if I go into Excel and manually print out a sheet 50 times or so also. Is this an issue with Excel on our Windows 2k Server Environment, or should I start digging into printer ...

Help with macro #6
Good evening: Is it possible to insert a formula in the below listed MACRO. [Column D is always a date. I need Column F to display a date 14 days greater] Thanks in advance John Sub EnterGrievance() ' ' EnterGrievance Macro ' Macro recorded 2/25/2008 by John Donadio ' ' Keyboard Shortcut: Ctrl+c 'Range("A12").Select Dim FromRng As Range Dim ToRng As Range With Worksheets("Data Sheet") Set FromRng = .Range("A12:M12") End With With Worksheets("Grievance Log") Set ToRn...

how to define scroll bar's page size value?
Hi all, I have a confusion about calculating scroll bar's page size. In my application, I am drawing an image according to scroll bar position. m_iGeneratedImgWidth - Width size of the image (this value is always bigger) rect.right - Width of the drawing area. how to define scroll bar's page size value? SCROLLINFO info; info.cbSize = sizeof(SCROLLINFO); info.fMask = SIF_RANGE|SIF_PAGE|SIF_POS; info.nPos = 0; info.nMin = 0; info.nMax = m_iGeneratedImgWidth - rect.right; info.nPage = ? In my OnHScrollBar() function, for SB_PAGELEFT / SB_PAG...

macro problem with Word 2001
Whenever I attach a Word 2001 document to an email and send it to someone using PC, the PC user's computer interprets the macros as a virus. How can I a) disable macros on Word or b) send it in a way that the PC will not interpret it as a virus? Thanks for any help Hi Unless you are intentionally making Word documents with Macros it is almost certain that you are indeed sending documents that have a virus. If your Word documents are supposed to have macros, then your audience needs to adjust the security settings on their computer in Word (Tools > Options > Security > Ma...

importing or creating reference footnotes
I am trying to import a word document into publisher and it has reference footnotes within the document. The reference footnotes are not coming into the publisher document with the reference footnotes. Correct, they will not up to Publisher 2003. In Publisher 2003 depending on which version of Word you are using if they will or not. -- "If you don't know where you are going, any road will take you there!" ...

Print Autocomplete list
I am using Outlook 2003 and have been unable to find out any way of viewing and printing a copy of all of the entries in the Autocomplete list. Is this possible? A reference to a helpfull article or tutorial would be appreciated. TIA There's this tool which may help: http://www.nirsoft.net/utils/outlook_nk2_autocomplete.html "KiwiBrian" <briantoz@ihug.co.nz> wrote in message news:h99lja$fdl$1@lust.ihug.co.nz... > I am using Outlook 2003 and have been unable to find out any way of > viewing and printing a copy of all of the entries in the Autocomplete > lis...

Task Create - Status
I'm trying to make a simple task, when a user owner is assigned a task in CRM, it receives an email letting it know it has one. I have the following below, but it is not generating one when i assign one manually in the CRM. What to do? I've tried both the following: When task is created E-Mail to:[owner];Subject test As well as: When task is created if Task activity status = Open then E-Mail to:[owner];Subject test I've checked the mailserver many times over, and I can send emails manually from the CRM so you can rule that out Tested out ok on our end. Some ideas:...

Mailbox not created when AD account created
A couple of days ago I noticed that I created a user account but the 'Email Addresses' tab of the user properies did not list any email addresses. Subsequent new user accounts have all experienced the same. I researched the knowledge and tried the recommended solutions to either manaully start the recipient update service or rebuild te recipient update service. Neither recommendation has resulted in a mailbox being created for this particular user or any additional user that I have created since this error first showed up. I performed a Windows update last Thursday and so I bel...

how to print envelopes in xl?
I have a name and address file in Exel. I understand that it is possible to print envelopes using Report in Excel. My data file is 3000 names. How do I proceed? I tried using Word 2000 but cannot get past the Wizard. I know how to use Mail Merge without the Wizard in Word 97. mail merge in word in the only way i know. I've used xl to print lable but never envelopes. >-----Original Message----- >I have a name and address file in Exel. I understand that it is possible to >print envelopes using Report in Excel. My data file is 3000 names. How do I >proceed? > >I ...

Help Creating XmlNode / XmlAttribute Elegantly
I am creating a configuration class to read / write a standard configuration file. <?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <add key="ConnectionString" value="server=(local);" /> </appSettings> </configuration> I am using a XmlDocument for my base implementation. I am looking to see if there is a better way to add a new node / attribute than using XmlDocument.InnerXml. I would consider this to be a hack but couldn't really see another way of doing this without definin...

Business Logic Extensions to Microsoft CRM 1.2: Post-Callouts works only with the CRM
hi, i extendet my ms crm organisation with own written business logic. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmbscrm1_2/html/mbs_crmpostcalloutsv1d2.asp so far so fine, but it works only with the crm-admin user account. all other users makes no impact on saving the organisation. any ideas? thx urb ...

How to accomplish mixed page orientation?
How can I have some pages with portrait and some pages with landscape orientation in the same visio file? Thanks, Keith Brickey Keith, In the File > Page Setup dialog, go to the "Page Size" tab and make sure that "Same as printer paper size" is not checked. When printing, you'll need to change the printer orientation to match the page that you want to print. This is only necessary if you're running a version of Visio older than Visio 2003. -- Dawn This posting is provided "AS IS" with no warranties, and confers no rights. "Keith Brickey...

Create external database
Hi all. I need to create an external database (file). On a site I found this code: ------------------------------------------------------ Function CreateLinkedExternalTable(strTargetDB As String, strProviderString As String, strSourceTbl As String, strLinkTblName As String) As String 'strTargetDB = Source Database Name 'strProviderString = Not used, currently hard coded 'strSourceTbl = Source Table name in the database we are linking too. 'strLinkTblName = Table name we would like to see in the Access Database. Dim catDB As ADOX.Catalog Dim tblLink As...

How to create pie chart with %
I have got a problem that I don't if excel could help me to calculate the % within a column and draw a pie chart. My case is I have a column containing a series of numbers. e.g. 1,4,8,1,3,9,11,2,4,5,6,.........etc I want to draw a pie chart that showing 1-3 , 4-6, 7-9, >9 with the corresponding % inside that column. Can anyone tell me how can I make it ? Ray - You need to calculate the frequencies in your data. Let's assume your data is in A1:A12. In B1:B3 enter these numbers, the upper limits on the groupings: 3 6 9 You can enter ">9" into B4 witho...

Email address not created when a new user is created
All, This issue recently happened in my company. Upon creating a new user, the policy was set to create the smtp and X400 address automaticaly. Now when we create a user the smtp and x400 addresses are not created, and when attempting to setup the new user in outlook, the address cant be found. We are using exchange 2003 SP1 on Win2k3 servers. On Wed, 13 Jul 2005 06:49:07 -0700, "Bryan" <Bryan@discussions.microsoft.com> wrote: >All, >This issue recently happened in my company. Upon creating a new user, the >policy was set to create the smtp and X400 addres...

Printing address lables from spreadsheet?
I have created numerous address lists on spreadsheets. Is it possible to construct these lists in a way to send to a printer and it just labels the envelopes and such? I do this all the time... I use mail merge in Word and use my exce sheet as the database. I have found it to be the best way to get whole bunch of different envelopes/letters out quickly -- eluehman ----------------------------------------------------------------------- eluehmann's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1309 View this thread: http://www.excelforum.com/showthread.php?th...

Printing Invoices in HQ
At the store level we print off 2 copies of invoices. At the HQ level we are trying to re-print those invoices, but only 1 copy. The only way that we can come up with is to change it to one copy in the preferences of the printer. I was wondering if there is any easier way to do this. Thanks, Brad ...

Macro to insert Hard Space (character 160)?
Hello, Is there a very simple macro out there that would let me insert character 160 (the hard space) into the current cell? I am looking for something like this because I want to be able to apply "accountant single" and "accountant double" underlining to a blank cell, and Excel seems to demand that some text be IN the cell before it will underline it. The hard space works perfectly, but it would be nice to be able to automate it. Many thanks for any advice, Edward Mendelson Sub HardSpace() ActiveCell.Value = ActiveCell.Value & Chr(160) End Sub Jerry Edward...

when form created
I have a form which was created by someone else (not a form template) which is like a questionnaire with empty boxes to be completed. When the boxes are typed in all the margins move to accommodate the words being typed. Is there a way to fix/lock the original form and then just fill in the blank boxes? I suspect this is set up as a table with auto resizing enabled. Displaying table gridlines (Table | Show Gridlines) will help you see what you're dealing with. Then select the table, go to the Table tab of Table Properties, click Options, and clear the check box for "A...

Exchange 2010 MRM, no log files being created
I'm hoping someone can help me with this issue....it has been driving me crazy for days. I have enabled MRM logging on our exchange server, and I can see that some of the policies are working when I run start-managedfolderassistant. We have a retention policy tag on the deleteditems folder, and this does work. The problem is I am not getting any files in the MRM log directory. C:\Program Files\Microsoft\Exchange Server\V14\Logging\Managed Folder Assistant Events 9021 and 9022 are logged in the Application log, but where are the files? Below is the output of my mai...

Creating a Brochure
How do you create a 3-column brochure from scratch for Publisher 2002? I can only find the directions for the 2003 version. Quick help would be appreciated, project is due Monday. Create a three-panel or four-panel folded publication http://office.microsoft.com/en-us/assistance/HP011646681033.aspx Scroll down to the section that says "Build a three-panel or four-panel publications from scratch." -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Derek" <Derek@discussions.microsoft.com> wrote in message news...

How do you print an Excel worksheet to show the rows and columns?
I'm new to Excel, and trying to print a document that will show the rows and columns, rather than just the information. How do I do this? In Excel 97 (later versions will, I assume, be similar) click File - Page Setup. Then select the "Sheet" tab and in the box labelled "Print" will be a checkbox labelled "Gridlines". Check that and print it. Peter "Michaelangelo" <Michaelangelo@discussions.microsoft.com> wrote in message news:A635EBC2-AB49-45D8-803D-5C2E91ACDDAC@microsoft.com... > I'm new to Excel, and trying to print a document th...

Enabling Macro But Hiding Sheets
I have created a simple macro that basically when a button is clicked i takes you to a certain page in the workbook. Is it possible to hide this page for different users. But when a use with the correct password comes he can click the button and he will b taken to the hidden page. Is it posible to do something like this along those line -- Message posted from http://www.ExcelForum.com It's possible, and if you search the archives: http://google.com/advanced_group_search?q=group:*excel* you'll find many ways to do this. You should know, however, that none of the methods will ...