ColdGeorge
Active Member
- Joined
- Aug 21, 2012
- Messages
- 412
- Office Version
- 2016
- Platform
- Windows
Hi all
The code shown below is working just fine
This one is not, I'd like to know why, can you help?
Any suggestion? thanks in advance.
The code shown below is working just fine
Code:
Private Sub Workbook_Open()
Worksheets("Publicaciones").Activate
Dim celda As Range
For Each celda In Worksheets("Publicaciones").Range("B2:B1000")
If celda.Value = Date Then
celda.Select
End If
Next
Application.Goto Selection, scroll:=True
ActiveWindow.ScrollColumn = 1
End Sub
This one is not, I'd like to know why, can you help?
Code:
Private Sub Workbook_Open()
Worksheets("Publicaciones").Activate
Dim celda As Range
Dim lastrow As Long
lastrow = Cells(Rows.Count, 1).End(xlUp).Row
Dim rng As Range
Set rng = Range("B" & lastrow)
For Each celda In rng
If celda.Value = Date Then
celda.Select
End If
Next
Application.Goto Selection, scroll:=True
ActiveWindow.ScrollColumn = 1
End Sub
Any suggestion? thanks in advance.