Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 58
Default Jumping to a certain cell

Dear Excell(ent) users,

I have a file with multiple sheets. In those sheets I work with dates
(dd-mm-yy). What I am looking for is a macro which opens the file in those
sheets at the current date.

For instance 15-03-2007 is in Cell BX3, so when it would be 15-03-2007 when
I open that sheet, the cursor should be in BX3.

Can you help me, please?

Thank you !
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 903
Default Jumping to a certain cell

You would want to use an Event macro.

Event Macros, Worksheet Events and Workbook Events
http://www.mvps.org/dmcritchie/excel/event.htm
Worksheet_Activate Event (#ws_activate)
http://www.mvps.org/dmcritchie/excel...tm#ws_activate

which is set up for the current date upon sheet activation
you can limit it to a specific column.
---
HTH,
David McRitchie, Microsoft MVP - Excel
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"The Fool on the Hill" wrote in message
...
Dear Excell(ent) users,

I have a file with multiple sheets. In those sheets I work with dates
(dd-mm-yy). What I am looking for is a macro which opens the file in those
sheets at the current date.

For instance 15-03-2007 is in Cell BX3, so when it would be 15-03-2007 when
I open that sheet, the cursor should be in BX3.

Can you help me, please?

Thank you !



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Jumping to a certain cell

Put this in Worksheet code for the sheet in question:

Private Sub Worksheet_Activate()
Dim s As String
s = Date
For Each r In ActiveSheet.UsedRange
If Not IsEmpty(r) Then
If s = r.Value Then
r.Select
Exit Sub
End If
End If
Next
End Sub

--
Gary''s Student - gsnu200720


"The Fool on the Hill" wrote:

Dear Excell(ent) users,

I have a file with multiple sheets. In those sheets I work with dates
(dd-mm-yy). What I am looking for is a macro which opens the file in those
sheets at the current date.

For instance 15-03-2007 is in Cell BX3, so when it would be 15-03-2007 when
I open that sheet, the cursor should be in BX3.

Can you help me, please?

Thank you !

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Jumping to a certain cell

To have the activate operate on all sheets place the code into Thisworkbook
module and rename to

Private Sub Workbook_SheetActivate(ByVal Sh As Object)


Gord Dibben MS Excel MVP

On Fri, 11 May 2007 07:36:00 -0700, Gary''s Student
wrote:

Put this in Worksheet code for the sheet in question:

Private Sub Worksheet_Activate()
Dim s As String
s = Date
For Each r In ActiveSheet.UsedRange
If Not IsEmpty(r) Then
If s = r.Value Then
r.Select
Exit Sub
End If
End If
Next
End Sub

--
Gary''s Student - gsnu200720


"The Fool on the Hill" wrote:

Dear Excell(ent) users,

I have a file with multiple sheets. In those sheets I work with dates
(dd-mm-yy). What I am looking for is a macro which opens the file in those
sheets at the current date.

For instance 15-03-2007 is in Cell BX3, so when it would be 15-03-2007 when
I open that sheet, the cursor should be in BX3.

Can you help me, please?

Thank you !


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Jumping to the next cell automaticly Amarilla Excel Discussion (Misc queries) 3 October 26th 06 03:08 AM
Jumping Cursor Rebecca New Users to Excel 4 June 22nd 06 04:55 AM
Jumping Between Sheets! lzweifel Excel Discussion (Misc queries) 3 April 6th 06 09:40 PM
How do I stop the input cell from jumping to the mouse cursor? JMorris Excel Discussion (Misc queries) 1 August 13th 05 12:35 AM
Highlighted cell jumping to cursor location snowedin Excel Discussion (Misc queries) 0 January 19th 05 09:16 PM


All times are GMT +1. The time now is 02:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"