![]() |
Putting cursor in cell A1 for each worksheet
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 |
Putting cursor in cell A1 for each worksheet
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 On Jan 19, 1:20 pm, "Matt" wrote: 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 |
Putting cursor in cell A1 for each worksheet
Thanks. That works!
|
Putting cursor in cell A1 for each worksheet
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. |
All times are GMT +1. The time now is 04:45 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com