Putting cursor in cell A1 for each worksheet

M

Matt

I need some help! I would like to have everysheet in the workbook put
the cursor in cell A1. I have already written some code and this will
keep every worksheet nice and neat when someone selects a particular
worksheet. Below is what I have so far. The problem is the cursor
goes in the cell A1 but the sheet isn't scrolled up. For instance, if
the cursor is in cell C100, the code puts the cursor in cell A1, but
the worksheet stays where cell C100 is visible and doesn't scroll up to
so cell A1 is visible. Any help is much appreciated. Thanks in
advance.


Dim WkSheet As Worksheet
For Each WkSheet In ActiveWorkbook.Worksheets
WkSheet.Activate
ActiveSheet.Range("A1").Activate
Next

Matt
 
O

okrob

Add this to your loop
Dim WkSheet As Worksheet
For Each WkSheet In ActiveWorkbook.Worksheets
WkSheet.Activate
ActiveSheet.Range("A1").Activate
ActiveWindow.ActiveCell.Show '<==== add this line...
Next
 
G

Guest

I'm trying to do something like this, but can't seem to adapt the code given
here to work.

I have some code using a temporary area at AA:200. When it's done, I want
the workbook to go back to A1, but it doeesn't actually scroll. It does got
to A1, but the sheet hasn't scrolled up or over to the left.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top