?
Solved

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

Posted on 2013-05-15
3
Medium Priority
?
546 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 500 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 (Microsoft MVP / EE MVE)
Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

777 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