Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to Move Selected Cell to Top of Screen


Bingo!

Here's one way of doing it.

Create a macro called "TopOfScreen". This essentially takes the activ
cell and repositions it to the top of the screen. The only differenc
here is that you don't have to specify a cell reference as long a
you've selected the cell you want. Then, to rid the challenge of th
left column shifting to the right, use the ActiveCell.Offset comman
where the first number represents how many rows to reposition the row
and the second number represents how many columns to shift the columns
In this case, I just need to shift the columns one to the left to ge
column A back on the screen.

Sub TopOfScreen()
ActiveCell.Select
With ActiveWindow
.ScrollColumn = ActiveCell.Column
.ScrollRow = ActiveCell.Row
ActiveCell.Offset(0, -1).Select
End With
End Sub

Thanks for getting the ball rolling.

Dav

--
sns
-----------------------------------------------------------------------
snsd's Profile: http://www.excelforum.com/member.php...fo&userid=1591
View this thread: http://www.excelforum.com/showthread.php?threadid=27390

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
How do I move the current cell to the top of the screen? mad.cow Excel Discussion (Misc queries) 6 May 29th 05 05:35 AM
Macro to Move Selected Cell to Top of Screen snsd Excel Programming 1 October 31st 04 12:29 AM
Macro to Move Selected Cell to Top of Screen Celtic_Avenger[_52_] Excel Programming 0 October 30th 04 11:13 PM
Create Macro - move selected rows to new spread sheet chrisak Excel Programming 1 May 24th 04 06:55 PM
Macro to move selected cell contents to a specific column on same row Ben Johnson[_3_] Excel Programming 1 February 10th 04 08:43 PM


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

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

About Us

"It's about Microsoft Excel"