Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default How to locate a cell in the absolute A1 position

Hi,
I have a workbook with about 10 spreadsheets. There are several named
ranges and each sheet is about 20 cols x up to 200 rows. Unless I
discipline myself to Ctrl+Home before leaving each sheet, the next time I
enter the sheet the cursor may be "anywhere" (i.e. where I was last).

I need to find a way to easily reorientate a sheet to get the AI in the top
left corner; (similarly for a named range).

Is there a way of inserting some code into the "navigation" macros so that
at each point od entry, it is controllable and predictable.

Thanking you in anticipation (you guys have been a massive help to my
learning and development),

Jeff Smith



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to locate a cell in the absolute A1 position

go to the workbook event module (thisworkbook in the project explorer) and
us an event like this:

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Application.Goto Sh.Range("A1"), True
End Sub


--
Regards,
Tom Ogilvy


Jeff Smith wrote in message
...
Hi,
I have a workbook with about 10 spreadsheets. There are several named
ranges and each sheet is about 20 cols x up to 200 rows. Unless I
discipline myself to Ctrl+Home before leaving each sheet, the next time I
enter the sheet the cursor may be "anywhere" (i.e. where I was last).

I need to find a way to easily reorientate a sheet to get the AI in the

top
left corner; (similarly for a named range).

Is there a way of inserting some code into the "navigation" macros so that
at each point od entry, it is controllable and predictable.

Thanking you in anticipation (you guys have been a massive help to my
learning and development),

Jeff Smith





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default How to locate a cell in the absolute A1 position

I have done this and am impressed by this code.

In the workbook there is a named range "MatlsCosts" that is located
Sheet!Materials!AB1:AX150. When I call for this range Excel typically shows
this data about the fourth column from the left. This is the only
unresolved query now - How do I get this range in the top left corner when I
navigate to it? (I don't want to lose the benefit of this new code below
which will now form the basis of most new preojects I start. Thanks very
much for this)

sincerely

Jeff Smith


"Tom Ogilvy" wrote in message
...
go to the workbook event module (thisworkbook in the project explorer) and
us an event like this:

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Application.Goto Sh.Range("A1"), True
End Sub


--
Regards,
Tom Ogilvy


Jeff Smith wrote in message
...
Hi,
I have a workbook with about 10 spreadsheets. There are several named
ranges and each sheet is about 20 cols x up to 200 rows. Unless I
discipline myself to Ctrl+Home before leaving each sheet, the next time

I
enter the sheet the cursor may be "anywhere" (i.e. where I was last).

I need to find a way to easily reorientate a sheet to get the AI in the

top
left corner; (similarly for a named range).

Is there a way of inserting some code into the "navigation" macros so

that
at each point od entry, it is controllable and predictable.

Thanking you in anticipation (you guys have been a massive help to my
learning and development),

Jeff Smith







  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to locate a cell in the absolute A1 position

Application.EnableEvents = False
Application.goto Reference:=range("MatlsCosts"), Scroll:=True
Application.EnableEvents = True


--
Regards,
Tom Ogilvy


Jeff Smith wrote in message
...
I have done this and am impressed by this code.

In the workbook there is a named range "MatlsCosts" that is located
Sheet!Materials!AB1:AX150. When I call for this range Excel typically

shows
this data about the fourth column from the left. This is the only
unresolved query now - How do I get this range in the top left corner when

I
navigate to it? (I don't want to lose the benefit of this new code below
which will now form the basis of most new preojects I start. Thanks very
much for this)

sincerely

Jeff Smith


"Tom Ogilvy" wrote in message
...
go to the workbook event module (thisworkbook in the project explorer)

and
us an event like this:

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Application.Goto Sh.Range("A1"), True
End Sub


--
Regards,
Tom Ogilvy


Jeff Smith wrote in message
...
Hi,
I have a workbook with about 10 spreadsheets. There are several named
ranges and each sheet is about 20 cols x up to 200 rows. Unless I
discipline myself to Ctrl+Home before leaving each sheet, the next

time
I
enter the sheet the cursor may be "anywhere" (i.e. where I was last).

I need to find a way to easily reorientate a sheet to get the AI in

the
top
left corner; (similarly for a named range).

Is there a way of inserting some code into the "navigation" macros so

that
at each point od entry, it is controllable and predictable.

Thanking you in anticipation (you guys have been a massive help to my
learning and development),

Jeff Smith









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
Macro: Insert Blank Row with formulas uses absolute position probl steveb Excel Discussion (Misc queries) 1 June 18th 09 08:08 PM
Absolute cell reference will not remain absolute. Mike K Excel Worksheet Functions 1 October 8th 08 07:12 PM
Locate last cell in column Sloth Excel Discussion (Misc queries) 8 January 24th 08 05:36 PM
Formula to locate a cell jhyatt Excel Discussion (Misc queries) 2 October 9th 07 09:06 PM
Locate a cell, based on a criteria, then use the 'Cell' command... cdavidson Excel Discussion (Misc queries) 1 November 17th 05 06:30 PM


All times are GMT +1. The time now is 11:51 PM.

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"