Solved

MS Excel Position cursor in Cell C2 in all sheets in a workbook

Posted on 2013-11-14
2
361 Views
Last Modified: 2013-11-14
I am looking for a macro that would place the cursor in Cell C2 of all sheets of a workbook when the file is opened -- regardless of where the cursor was at the time of save. I also need the first sheet of the workbook to be in focus when the file is opened. I currently have the following code running for "all worksheets"; however, when the file is opened, the last sheet is in focus (instead of the first). Any help is greatly appreciated!

Private Sub Workbook_Open()
Dim WSheet As Worksheet

For Each WSheet In Worksheets
WSheet.Activate
Range("C2").Select
Next
End Sub
0
Comment
Question by:jaguar5554
2 Comments
 
LVL 33

Accepted Solution

by:
Norie earned 500 total points
ID: 39648796
Try this.
Private Sub Workbook_Open()
Dim I As Long

    For I = Worksheets.Count To 1 Step -1
        Application.Goto WorkSheets(I).Range("C2"), Scroll:=True
    Next I

End Sub 

Open in new window

0
 

Author Comment

by:jaguar5554
ID: 39648808
That is perfect.  Thank you very much.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question