Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi KeepItCool,
your code will produce the wrong result if a month doesn't have 31 days. (iso Feb28 it'll give March3) following will give the last day of the month: with frmWorkHistory CellPosition.Value = _ DateSerial(.txtStartYear,.txtStartMonth+1,1)-1 end with True, but it is not clear that the OP necessarily wants the last day of the month - see his use of day 1 in earlier code. --- Regards, Norman "keepITcool" wrote in message .com... Norman, your code will produce the wrong result if a month doesn't have 31 days. (iso Feb28 it'll give March3) following will give the last day of the month: with frmWorkHistory CellPosition.Value = _ DateSerial(.txtStartYear,.txtStartMonth+1,1)-1 end with -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Norman Jones wrote : With frmWorkHistory CellPosition.Value = DateSerial(.txtStartYear.Value, _ Me.txtStartMonth, 31) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I pass network logon name to a cell in a spreadsheet? | Excel Worksheet Functions | |||
How to calculate pass/fail percentages entered on a spreadsheet? | New Users to Excel | |||
How do I flag a cell in Excel 2002 when the date entered has pass | Excel Discussion (Misc queries) | |||
How do I flag a cell in Excel 2002 when the date entered has pass | Excel Discussion (Misc queries) | |||
Pass file name from Spreadsheet Range | Excel Programming |