Scroll down to today's date

pontiff

Board Regular
Joined
Jun 11, 2009
Messages
150
Office Version
  1. 2016
Hi,
I'm using the following script from another thread to try to have my worksheet (sheet1) scroll down to the row containing today's date on opening.

Private Sub Workbook_Open()
Worksheets(“Sheet1”).Select
x = Format(Date, "dd/mm/yyyy")
On Error Resume Next
Worksheets(“Sheet1”).Columns(2).Find(What:=x, LookIn:=xlValues).Activate
Application.Goto Selection, True
End Sub

My dates are in column B as dd/mm/yyyy .

It seems to select the correct date (green box appears around 06/03/2018) but doesn't scroll down/up to it.
Any advice much appreciated.
 
One last question... the dates are in column B so it “hides” column A when it scrolls. Can the code be altered to scroll down to today’s date row but still show column A?
 
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Just change this:
Code:
[COLOR=#333333]ActiveWindow.ScrollColumn = Selection.Column
to this:
[/COLOR]
Code:
[COLOR=#333333]ActiveWindow.ScrollColumn = 1[/COLOR]
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,269
Members
452,628
Latest member
dd2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top