ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to show the active cell after running a macro? (https://www.excelbanter.com/excel-programming/336077-how-show-active-cell-after-running-macro.html)

shellshock[_5_]

How to show the active cell after running a macro?
 

I have a macro that inserts rows and copies formulas on two worksheets,
and then selects the first cell into which the user should begin to
enter data.

The problem is that even though the right cell is selected for the
user, that cell is not necessarily visible on screen. (The screen may
be showing rows 70 to 100, when the relevant row is actually 500.)

Is there a way to "find" the active cell? To make it so that Excel has
not only selected the active cell, but is actually showing it as well?


--
shellshock
------------------------------------------------------------------------
shellshock's Profile: http://www.excelforum.com/member.php...o&userid=24935
View this thread: http://www.excelforum.com/showthread...hreadid=391978


bhofsetz[_123_]

How to show the active cell after running a macro?
 

You can have it scroll to the row where the active cell is

ActiveWindow.ScrollRow = ActiveCell.Row

HTH


--
bhofsetz
------------------------------------------------------------------------
bhofsetz's Profile: http://www.excelforum.com/member.php...o&userid=18807
View this thread: http://www.excelforum.com/showthread...hreadid=391978


shellshock[_6_]

How to show the active cell after running a macro?
 

That's exactly what I needed! :)

Thanks so much; I figured there had to be a way to scroll the window
but I just didn't know how to do it. :cool:


--
shellshock
------------------------------------------------------------------------
shellshock's Profile: http://www.excelforum.com/member.php...o&userid=24935
View this thread: http://www.excelforum.com/showthread...hreadid=391978



All times are GMT +1. The time now is 02:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com