Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Putting cursor in cell A1 for each worksheet

Thanks. That works!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default 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.

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
Putting a hyperlink into a protected worksheet Tony Excel Discussion (Misc queries) 2 September 3rd 07 12:08 PM
putting one name under another on a cell HoganD87 Excel Discussion (Misc queries) 2 August 20th 07 03:04 PM
Putting a word into a cell. the-jackal New Users to Excel 2 September 15th 06 08:03 AM
SAP BW Report - Putting the Unit of Measure or Currency in another Cell based on Format Cell Frank & Pam Hayes[_2_] Excel Programming 1 December 3rd 05 05:38 PM
Putting items from list box multi-select onto worksheet ericd Excel Programming 0 February 26th 04 08:16 PM


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

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

About Us

"It's about Microsoft Excel"