ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Setting cursor location on opening (https://www.excelbanter.com/excel-programming/407811-setting-cursor-location-opening.html)

Howard Irwin

Setting cursor location on opening
 
I'm using Excel 2003. When I open a worksheet, I would like the cursor to
move to a cell to the right of a cell with the current date in it. Is there
an easy way to do this?
--
Howard Irwin

Mike H

Setting cursor location on opening
 
Hi,

Can you narrow it down a bit regarding where todays date might be because it
would take a fair while to look through 16million cells and thats on Excel
2003.

Mike

"Howard Irwin" wrote:

I'm using Excel 2003. When I open a worksheet, I would like the cursor to
move to a cell to the right of a cell with the current date in it. Is there
an easy way to do this?
--
Howard Irwin


FSt1

Setting cursor location on opening
 
hi
where is the currents date? does it move?
assuming it is stationary and Sheet 1 A1....
Private Sub Workbook_Open()
Sheets("sheet1").Activate
Range("A2").Select
End Sub
This is workbook event code.
put it in a workbook module.

Regards
FSt1

"Howard Irwin" wrote:

I'm using Excel 2003. When I open a worksheet, I would like the cursor to
move to a cell to the right of a cell with the current date in it. Is there
an easy way to do this?
--
Howard Irwin


Gary''s Student

Setting cursor location on opening
 
Very easy. Just paste this Event sub in the worksheet code area:

Private Sub Worksheet_Activate()
d = Date
For Each r In ActiveSheet.UsedRange
If r.Value = d Then
r.Offset(0, 1).Select
Exit Sub
End If
Next
End Sub
--
Gary''s Student - gsnu200774


"Howard Irwin" wrote:

I'm using Excel 2003. When I open a worksheet, I would like the cursor to
move to a cell to the right of a cell with the current date in it. Is there
an easy way to do this?
--
Howard Irwin



All times are GMT +1. The time now is 06:39 PM.

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