Solved

Excel automated task Help

Posted on 2013-10-31
3
172 Views
Last Modified: 2013-10-31
I have a sheet in Excel 2013, and use it for a daily schedule. To generate the sheet, I put a number (from 1 to 31) in cell C1, and all the cells in the sheet update automatically. I then print out the page and go to the next number (so first I enter 1, print, then 2, print, then 3, print, etc.)

I would like to automate this task, so that I can just click GO and excel will fill in the numbers 1 to 31 in the sheet, and print out the sheet (on the default printer) for each number.

Can someone help me create this automated task?
0
Comment
Question by:Lev Seltzer
3 Comments
 
LVL 50

Expert Comment

by:Rgonzo1971
ID: 39613611
Hi,

Could you send an example?

Regards
0
 
LVL 12

Accepted Solution

by:
Harry Lee earned 500 total points
ID: 39615100
WEBuilder,

Try this code.

Sub PrintDailyReport()
Dim I As Integer

For I = 1 To 31
    Range("C1").Value = I
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
        IgnorePrintAreas:=False
Next

End Sub

Open in new window

0
 

Author Closing Comment

by:Lev Seltzer
ID: 39615303
Perfect. Thank you very much for your quick response!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question