Open spreadsheet to a specific dynamic cell

drivingforce

New Member
Joined
Dec 11, 2013
Messages
19
Hi all knowledgeable excel people out there!

The code below will open my spreadsheet at any specified fixed location (e.g. A1) , but is it possible to re-write this code in such a way that the spreadsheet will open at a dynamic location instead?

Private Sub Workbook_Open()
Sheets("Sheet1").Activate
Range("A1").Select
End Sub

What I have is a spreadsheet which contains dates for a couple of years on row 3, and I'd like the spreadsheet to open at today's location, if possible?

Thanks.
 
Sure thing. SaveWork code below.

Sub SaveWork()
ThisWorkbook.Save
ThisWorkbook.Close
End Sub

Unless you see a simple solution to this, I am leaning towards just getting rid of the workbook_open code as this is just a convenience thing, and really not that important.

Thanks again.
I see no reason why the workbook_open code would shut down your autosave, but before you abandon it try this one change:
Rich (BB code):
Private Sub Workbook_Open()
Dim R As Range
Set R = Cells.Find(Date, [A1], xlFormulas, xlWhole)
If Not R Is Nothing Then
ActiveWindow.ScrollRow = R.Row
R.Select
Else
MsgBox "Can't find today's date"
End If
Call Reset
End Sub
 
Upvote 0
I see no reason why the workbook_open code would shut down your autosave, but before you abandon it try this one change:
Rich (BB code):
Private Sub Workbook_Open()
Dim R As Range
Set R = Cells.Find(Date, [A1], xlFormulas, xlWhole)
If Not R Is Nothing Then
ActiveWindow.ScrollRow = R.Row
R.Select
Else
MsgBox "Can't find today's date"
End If
Call Reset
End Sub

Excellent! That worked out great.

Thank you SO much for all your help! My co-workers and I sure appreciate it!
Cheers!
 
Upvote 0

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