A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Position screen at end of macro



 
 
Thread Tools Display Modes
  #1  
Old May 6th, 2010, 10:28 AM posted to microsoft.public.excel.misc
Kevryl
external usenet poster
 
Posts: 119
Default Position screen at end of macro

So far, at the end of a macro I've been sending the cursor across to various
columns and back to position the screen. Itys a bit clumsy, and of course
when you work between different sized computer monitors it doesn't work the
same.

Is there a quick way to position a partcular cell at top left of screen -
and perhaps on a separate occasion a particular cell at bottom right?

Thanks.
  #2  
Old May 6th, 2010, 11:53 AM posted to microsoft.public.excel.misc
Mike H
external usenet poster
 
Posts: 8,419
Default Position screen at end of macro

Hi,

To put a cell at the top left

Application.Goto ActiveSheet.Range("B3"), scroll:=True
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Kevryl" wrote:

So far, at the end of a macro I've been sending the cursor across to various
columns and back to position the screen. Itys a bit clumsy, and of course
when you work between different sized computer monitors it doesn't work the
same.

Is there a quick way to position a partcular cell at top left of screen -
and perhaps on a separate occasion a particular cell at bottom right?

Thanks.

  #3  
Old May 6th, 2010, 01:10 PM posted to microsoft.public.excel.misc
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default Position screen at end of macro

Hi Kevryl

Try the below

Sub GoToTopLeft()
Dim rngTemp As Range
Set rngTemp = Range(Split(ActiveWindow.VisibleRange.Address, ":")(0))
Application.Goto rngTemp, True
End Sub

Sub GoToBottomRight()
Dim rngTemp As Range
Set rngTemp = Range(Split(ActiveWindow.VisibleRange.Address, ":")(1))
rngTemp.Offset(-1, -1).Activate
End Sub

--
Jacob (MVP - Excel)


"Kevryl" wrote:

So far, at the end of a macro I've been sending the cursor across to various
columns and back to position the screen. Itys a bit clumsy, and of course
when you work between different sized computer monitors it doesn't work the
same.

Is there a quick way to position a partcular cell at top left of screen -
and perhaps on a separate occasion a particular cell at bottom right?

Thanks.

  #4  
Old June 3rd, 2010, 06:54 AM posted to microsoft.public.excel.misc
Kevryl
external usenet poster
 
Posts: 119
Default Position screen at end of macro

Thanks Mike and Jacob!

"Kevryl" wrote:

So far, at the end of a macro I've been sending the cursor across to various
columns and back to position the screen. Itys a bit clumsy, and of course
when you work between different sized computer monitors it doesn't work the
same.

Is there a quick way to position a partcular cell at top left of screen -
and perhaps on a separate occasion a particular cell at bottom right?

Thanks.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:09 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.