ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do you set cursor position at current date in macro? (https://www.excelbanter.com/excel-worksheet-functions/91009-how-do-you-set-cursor-position-current-date-macro.html)

Tom Robertson

How do you set cursor position at current date in macro?
 
--
Tom

Norman Jones

How do you set cursor position at current date in macro?
 
Hi Tom,

Perhaps:

'=============
Public Sub Tester()
Dim Sh As Worksheet

Set Sh = ActiveSheet

With Sh
.Cells.Find(What:=Date, _
After:=.Range("A1"), _
LookIn:=xlFormulas, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False).Activate
End With
End Sub
'<<=============

---
Regards,
Norman




All times are GMT +1. The time now is 11:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com