excel start up

  • Thread starter Thread starter craig
  • Start date Start date
C

craig

i have a working rota spreadsheet with dates in the columns and rota info
below, how do i get it to show todays date info at start up
 
With this file open and visible in the main Excel window, right-click
on the little Excel file icon to the left of the File menu (assumes
you are using xl2003) and choose View Code. Paste the following into
the code area of the VBE that will open up:

Private Sub Workbook_Open()
Dim lngRow As Long
With Sheets("Sheet1") ' amend sheet name as appropriate
lngRow = Application.Match(CLng(Date), .Range("A:A")) 'amend
column as appropriate
Application.Goto .Range("A" & lngRow), True 'amend column as
appropriate
End With
End Sub

You will need to amend the sheet name and the column to whichever
sheet your data is on and which column the dates are in. Save the
workbook, close and reopen, enabling macros when you do.

Hope thios helps!

Richard
 
Back
Top