Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Richard V
 
Posts: n/a
Default Launch excel showing today's date

Afternoon All,

In our office we have a very simple diary on Excel. We have the day's date
going down column B, and staff names across the top. We simply type in the
cell under our name next to todays date to show what are our plans for that
day.

This Diary goes back to early this year and every time we open the diary
(shared workbook) it starts with cell b4 highlighted (January 4 2005). This
means we have to scroll down to find today's date.

Is it possible to have Excel automatically find today's date in column B and
scroll down to it when we open excel, or can we record a macro that is
triggered by a click?

Cheers,

Richard
  #2   Report Post  
Paul B
 
Posts: n/a
Default

Richard, try this, put in thisworkbook code

Private Sub Workbook_Open()

'will go to today's date, in column B, on open

On Error Resume Next

ThisDay = DateValue(Date)

Range("B2").Select

i = 0

Do While ActiveCell.Offset(i, 0).Value < ThisDay

i = i + 1

Loop

ActiveCell.Offset(i, 0).Select

End Sub
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"Richard V" <Richard wrote in message
...
Afternoon All,

In our office we have a very simple diary on Excel. We have the day's date
going down column B, and staff names across the top. We simply type in the
cell under our name next to todays date to show what are our plans for
that
day.

This Diary goes back to early this year and every time we open the diary
(shared workbook) it starts with cell b4 highlighted (January 4 2005).
This
means we have to scroll down to find today's date.

Is it possible to have Excel automatically find today's date in column B
and
scroll down to it when we open excel, or can we record a macro that is
triggered by a click?

Cheers,

Richard



  #3   Report Post  
Richard V
 
Posts: n/a
Default

Hi Paul,

I tried this but Excel didn't seem to do anything different to usual when
opening. However I found this on google that seems to do the job:

Sub Today()
x = 8
Do
x = x + 1
If Cells(x, 2).Value = Date Then
Cells(x, 3).Select
Else
'
End If
Loop Until Cells(x + 1, 1) = ""
End Sub

I have assigned this to a button.

Cheers,

Richard V


"Paul B" wrote:

Richard, try this, put in thisworkbook code

Private Sub Workbook_Open()

'will go to today's date, in column B, on open

On Error Resume Next

ThisDay = DateValue(Date)

Range("B2").Select

i = 0

Do While ActiveCell.Offset(i, 0).Value < ThisDay

i = i + 1

Loop

ActiveCell.Offset(i, 0).Select

End Sub
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"Richard V" <Richard wrote in message
...
Afternoon All,

In our office we have a very simple diary on Excel. We have the day's date
going down column B, and staff names across the top. We simply type in the
cell under our name next to todays date to show what are our plans for
that
day.

This Diary goes back to early this year and every time we open the diary
(shared workbook) it starts with cell b4 highlighted (January 4 2005).
This
means we have to scroll down to find today's date.

Is it possible to have Excel automatically find today's date in column B
and
scroll down to it when we open excel, or can we record a macro that is
triggered by a click?

Cheers,

Richard




  #4   Report Post  
Paul B
 
Posts: n/a
Default

Richard, glad you got it to do what you want, did you put the code I posted
in thisworkbook module? like this


To put in this macro, from your workbook right-click the workbook's icon and
pick View Code. This icon is to the left of the "File" menu this will open
the VBA editor, in the left hand window double click on thisworkbook, under
your workbook name, and paste the code in the window that opens on the right
hand side, press Alt and Q to close this window and go back to your
workbook, now this will run every time you open the workbook. If you are
using excel 2000 or newer you may have to change the macro security
settings to get the macro to run. To change the security settings go to
tools, macro, security, security level and set it to medium
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"Richard V" wrote in message
...
Hi Paul,

I tried this but Excel didn't seem to do anything different to usual when
opening. However I found this on google that seems to do the job:

Sub Today()
x = 8
Do
x = x + 1
If Cells(x, 2).Value = Date Then
Cells(x, 3).Select
Else
'
End If
Loop Until Cells(x + 1, 1) = ""
End Sub

I have assigned this to a button.

Cheers,

Richard V


"Paul B" wrote:

Richard, try this, put in thisworkbook code

Private Sub Workbook_Open()

'will go to today's date, in column B, on open

On Error Resume Next

ThisDay = DateValue(Date)

Range("B2").Select

i = 0

Do While ActiveCell.Offset(i, 0).Value < ThisDay

i = i + 1

Loop

ActiveCell.Offset(i, 0).Select

End Sub
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"Richard V" <Richard wrote in message
...
Afternoon All,

In our office we have a very simple diary on Excel. We have the day's
date
going down column B, and staff names across the top. We simply type in
the
cell under our name next to todays date to show what are our plans for
that
day.

This Diary goes back to early this year and every time we open the
diary
(shared workbook) it starts with cell b4 highlighted (January 4 2005).
This
means we have to scroll down to find today's date.

Is it possible to have Excel automatically find today's date in column
B
and
scroll down to it when we open excel, or can we record a macro that is
triggered by a click?

Cheers,

Richard






Reply
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 Query Wizard Date Format aldsv Excel Discussion (Misc queries) 1 May 31st 05 12:44 PM
excel formula counting date to date in 4 columns stuie d Excel Worksheet Functions 1 May 4th 05 12:46 PM
Automatic Populate Todays Date in Cell when File is Saved. Nello Excel Discussion (Misc queries) 3 April 21st 05 11:08 PM
how to make excel select todays date from a list sococr Excel Worksheet Functions 1 February 27th 05 07:02 PM
Creating a Date Selector in Excel VBA? Mark Excel Discussion (Misc queries) 0 November 25th 04 10:59 PM


All times are GMT +1. The time now is 12:54 AM.

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

About Us

"It's about Microsoft Excel"