still learning
Well-known Member
- Joined
- Jan 15, 2010
- Messages
- 821
- Office Version
- 365
- Platform
- Windows
Hi
I have an activation macro for a sheet in a workbook I want it to find the date and scroll to the top of the screen
The macro finds the date ( the cursor goes to it) but doesn’t scroll to the top. I also have Conditional Format change the font to red. that works.
If I run the macro using F8 it works fine
I inserted a shape on the page and assigned a macro to it coping the activation macro and it works
I save the sheet and close using a macro that first goes to A1. I use the save and close macro for all sheets in excel
I use the same activation macro in other workbooks and worksheets, and it works fine
Any idea what I should look for?
mike
I have an activation macro for a sheet in a workbook I want it to find the date and scroll to the top of the screen
VBA Code:
Private Sub Worksheet_activate()
Set C = Range("A:A").Find(Date)
If Not C Is Nothing Then C.Select
ActiveWindow.ScrollRow = ActiveCell.Row
ActiveWindow.SmallScroll
End Sub
If I run the macro using F8 it works fine
I inserted a shape on the page and assigned a macro to it coping the activation macro and it works
VBA Code:
Sub opening()
Set C = Range("A:A").Find(Date)
If Not C Is Nothing Then C.Select
ActiveWindow.ScrollRow = ActiveCell.Row
ActiveWindow.SmallScroll
End Sub
I use the same activation macro in other workbooks and worksheets, and it works fine
Any idea what I should look for?
mike