ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   date upon open (https://www.excelbanter.com/excel-programming/313899-date-upon-open.html)

lawson

date upon open
 
i have a simple spreadsheet that i open about once a week that i enter data
in one line at a time. i want the date to be entered at the bottom of column
h in the first row after the last entry from the previous weeks entry.

3 march 12 2004
21 march 19
xxxxxx <- puts here when it opens

i know its somehthing like..

Private Sub Workbook_Open()

range(h'somethine')=Format(Now(), "mmmm d, yyyy")

end sub

CPBro

date upon open
 
Try:
Private Sub Workbook_Open()

Range(h & Range("H1".Currentregion.rows.count + 1) = Date

End Sub

Aslong as the list starts in cell H1 and column H is formated as a date - it
should appear correctly

"Lawson" wrote:

i have a simple spreadsheet that i open about once a week that i enter data
in one line at a time. i want the date to be entered at the bottom of column
h in the first row after the last entry from the previous weeks entry.

3 march 12 2004
21 march 19
xxxxxx <- puts here when it opens

i know its somehthing like..

Private Sub Workbook_Open()

range(h'somethine')=Format(Now(), "mmmm d, yyyy")

end sub


CPBro

date upon open
 
Sorry missed a bracket

Private Sub Workbook_Open()

Range(h & Range("H1".Currentregion.rows.count + 1)) = Date

End Sub


"CPBro" wrote:

Try:
Private Sub Workbook_Open()

Range(h & Range("H1".Currentregion.rows.count + 1) = Date

End Sub

Aslong as the list starts in cell H1 and column H is formated as a date - it
should appear correctly

"Lawson" wrote:

i have a simple spreadsheet that i open about once a week that i enter data
in one line at a time. i want the date to be entered at the bottom of column
h in the first row after the last entry from the previous weeks entry.

3 march 12 2004
21 march 19
xxxxxx <- puts here when it opens

i know its somehthing like..

Private Sub Workbook_Open()

range(h'somethine')=Format(Now(), "mmmm d, yyyy")

end sub



All times are GMT +1. The time now is 08:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com