Excel Diary Setup
I am trying to create a single day per tab diary in Excel whereby each
calendar day can occupy a single sheet. |
Excel Diary Setup
"Geoff" wrote in message
... I am trying to create a single day per tab diary in Excel whereby each calendar day can occupy a single sheet. Geoff What is the issue / problem / question? Give us a clue. We may be good at answering questions but mind reading is another thing altogether. Regards. Bill Ridgeway Computer Solutions |
Excel Diary Setup
Just create a basic sheet laid out the way you want it to be and copy it 364
times? But it seems to me that other applications would be more appropriate for a diary - such as Word or even Notepad, where you don't have to be so concerned with the amount of text entered and have more freedom (in Word) of the formatting and appearance of the text entered. I'm going to try to do some mind-reading here also and assume that you're looking for a way to get off easy with the copy it 364 times part of the work. Set up one sheet the way you want and call it 'DiarySheet' then copy and paste this code into a regular code module and run it from Tools | Macro | Macros Sub CreateYearsWorthOfSheets() 'start with one sheet laid out the way you want 'name it 'DiarySheet' and then run this code Const StartDate = #12/31/2006# ' day before you want diary to start Dim dayLoop As Integer Dim tabName As String Dim daysInYear As Integer daysInYear = 365 ' most years If (Year(StartDate) + 1 Mod 4) = 0 Then daysInYear = 366 ' leap year End If Application.ScreenUpdating = False ' make it fast(er) For dayLoop = 1 To daysInYear Worksheets("DiarySheet").Copy after:=Worksheets(Worksheets.Count) ActiveSheet.Name = Format(StartDate + dayLoop, "ddmmmyy") Next Worksheets("DiarySheet").Select Application.ScreenUpdating = True End Sub To get it into code: use [Alt]+[F11] to open the VB Editor, then choose Insert | Module from the menu. Paste the code above into the module that opens up and then close the VB Editor. "Geoff" wrote: I am trying to create a single day per tab diary in Excel whereby each calendar day can occupy a single sheet. |
All times are GMT +1. The time now is 09:57 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com