Solved

Select Cell A1 in all worksheets of a workbook when it opens

Posted on 2013-05-15
3
533 Views
Last Modified: 2013-05-15
Hi Experts

I have done some searching but can't seem to find how to do this successfully.

Can someone please help me with how to automatically have Cell A1 (for example) selected for each sheet within a particular workbook when it opens?

Thanks
darls15
0
Comment
Question by:darls15
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 125 total points
ID: 39169851
Try putting this in the workbook_open event handler of the workbook module (I have not tested it)

dim aws as worksheet
dim ws as worksheet
set aws = activesheet
for each ws in activeworkbook.worksheets
ws.activate
ws.range("A1").select
next ws
aws.activate
0
 
LVL 50

Assisted Solution

by:Ingeborg Hawighorst
Ingeborg Hawighorst earned 125 total points
ID: 39169855
Hello,

You can add this code to each sheet module:

Option Explicit

Private Sub Worksheet_Activate()
 Range("A1").Select
End Sub

Open in new window


Right-click the sheet tab, select "View code" and paste the code into the big code panel.

cheers, teylyn
0
 

Author Closing Comment

by:darls15
ID: 39169876
Thanks for your quick responses. Both solutions work well.

Thanks
darls15
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

726 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