LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
waiter11
 
Posts: n/a
Default Auto populate dates


Hi folks...
I need help from the expert out there.
I have an xls nutrition table that need to auto populate with dates
using a calendar instead of manually editing the date
See the macro code below
------------------------------------------
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 11/15/2005 by waiter
'
' Keyboard Shortcut: Ctrl+Shift+P
'
Range("A1").Select
ActiveCell.FormulaR1C1 = " Sunday 10-22-06"
Range("A6").Select
ActiveCell.FormulaR1C1 = " Monday 10-23-06"
Range("A11").Select
ActiveCell.FormulaR1C1 = " Tuesday 10-24-06"
Range("A16").Select
ActiveCell.FormulaR1C1 = " Wednesday 10-25-06"
Range("A21").Select
ActiveCell.FormulaR1C1 = " Thursday 10-26-06"
Range("A26").Select
ActiveCell.FormulaR1C1 = " Friday 10-27-06"
Range("A31").Select
ActiveCell.FormulaR1C1 = " Saturday 10-28-06"
Range("G8").Select
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = "&""Times New Roman,Bold""&14WEEK OF OCTOBER 22
2006"
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(0.25)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.25)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLegal
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
.PrintErrors = xlPrintErrorsDisplayed
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub

Thanks.
Any help will be greatly appreciated


--
waiter11
------------------------------------------------------------------------
waiter11's Profile: http://www.excelforum.com/member.php...o&userid=34875
View this thread: http://www.excelforum.com/showthread...hreadid=546240

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel auto filtering to find a range of dates in a list Candy Excel Discussion (Misc queries) 2 January 31st 06 02:32 PM
auto posting dates maintchief New Users to Excel 1 October 28th 05 01:20 AM
auto fill row with dates tdennis14 Excel Discussion (Misc queries) 5 October 27th 05 01:53 AM
How to Auto fill dates on a schedule cardingtr Excel Discussion (Misc queries) 3 September 23rd 05 06:55 AM
Auto populate cells based on 2 cells division. Chance224 Excel Discussion (Misc queries) 0 April 4th 05 09:35 PM


All times are GMT +1. The time now is 08:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"