• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 260
  • Last Modified:

Macro Code Revision - Go to specific cell on open

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
Geekamo
Asked:
Geekamo
1 Solution
 
Saqib Husain, SyedEngineerCommented:
Sheets("Measuring Up").Range("start").select
0
 
Saqib Husain, SyedEngineerCommented:
If you have other sheets you might have to do

Sheets("Measuring Up").activate
Sheets("Measuring Up").Range("start").select
0
 
NorieCommented:
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
 
Martin LissRetired ProgrammerCommented:
What are you trying to do here?


Sheets("Measuring Up").Range("N27") = "Diameter"
Application.Goto Reference:="Start"
0
 
GeekamoAuthor Commented:
@ 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

Independent Software Vendors: 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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now