Solved Goto specific value

December 26, 2011 at 15:47:43
Specs: Windows 7
Hi everyone,
I make a 2010 excel worksheet that open automatically when windows startup, contain my action plans and daily activity.
- column A : date
- column B : day
- column C : activity
- column D : pic
- column E : remarks
- column F : progress

Everyday, I have to move pointer to current day manually.
Can anybody help me to make macro that automatically move pointer to current day?

See More: Goto specific value

Report •

December 26, 2011 at 20:42:25
Assuming that the Dates in Column A are actual dates, this should work:

1 - Open the VBA editor via Alt-F11

2 - Double click the ThisWorkbook module.

3 - Paste this code into the pane that opens:

Private Sub Workbook_Open()
  With Columns("A")
    Set d = .Find(DateValue(Now))
     If Not d Is Nothing Then d.Select
  End With
End Sub

4 - Save the workbook as an xlsm file.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •

December 26, 2011 at 21:56:38
I have paste that code into the pane, and save the workbook as Excel Macro-Enabled Workbook, where the pointer position at 16/01/2012. Then I close the file.
When I open it, the pointer position still at 16/01/2012. Can the pointer position move to 27/12/2011 automatically?

Report •

December 27, 2011 at 09:28:03
✔ Best Answer
I've tried my suggested code in Excel 2003 and 2010.

In both cases, the cursor moves to 12/27/2011 when I open the file.

Are you sure that you put the code in the ThisWorkbook module?

If you put it in a standard module it will not work.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •

Related Solutions

December 27, 2011 at 21:38:42
The macro work well.

Report •

January 12, 2012 at 01:24:39
My worksheet consist of 3 sheets : real, Acara, and Alamat. In sheet 'real' there are activity days.
Sometimes I work in sheet 'Acara' as description of activity day, and then I save it. Tomorrow when I open Windows, I see sheet 'Acara' as active sheet.
How to make so when I open Windows I see sheet 'real' as active sheet.

Report •

Ask Question