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

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
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,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

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