Solved

Macro Code Revision - Go to specific cell on open

Posted on 2013-01-20
5
236 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
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 33

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access Database 5 38
Grouping Slicers - excel 3 37
Lookup - Vlookup 9 40
Check whether selected cells contain a certain fill color 5 29
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
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!
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

680 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