Solved

Macro Code Revision - Go to specific cell on open

Posted on 2013-01-20
5
241 Views
Last Modified: 2013-01-26
Hello Experts,

I am currently using this code in my workbook.

Private Sub Workbook_Open()
Sheets("Measuring Up").Range("N27") = "Diameter"
End Sub

In addition to that, I want the active cell to always go to the name range "Start". So anytime the workbook is opened, it's always on a specific cell - which is the named range of "Start".

I thought the code would be something like,...

Private Sub Workbook_Open()
Sheets("Measuring Up").Range("N27") = "Diameter"
Application.Goto Reference:="Start"
End Sub

But that doesn't work, cause clearly I don't know what I'm doing. :)

Any suggestions?

Thank you in advance for your help!

~ Geekamo
0
Comment
Question by:Geekamo
[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
5 Comments
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 38799180
Sheets("Measuring Up").Range("start").select
0
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 500 total points
ID: 38799182
If you have other sheets you might have to do

Sheets("Measuring Up").activate
Sheets("Measuring Up").Range("start").select
0
 
LVL 34

Expert Comment

by:Norie
ID: 38799192
The code works fine for me, without a worksheet reference.

What actually happens when you open the workbook?

Do you get an error or does the range not get selected?
0
 
LVL 47

Expert Comment

by:Martin Liss
ID: 38799250
What are you trying to do here?


Sheets("Measuring Up").Range("N27") = "Diameter"
Application.Goto Reference:="Start"
0
 
LVL 1

Author Comment

by:Geekamo
ID: 38799296
@ ssaqibh,

Your solution worked perfectly.  I am now using this code.

Private Sub Workbook_Open()
Sheets("Measuring Up").Range("N27") = "Diameter"
Sheets("Measuring Up").Activate
Sheets("Measuring Up").Range("Start").Select
End Sub

Thanks!

~ Geekamo
0

Featured Post

Industry Leaders: 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

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

739 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