Excel VB

Posted on 2014-08-12
Medium Priority
Last Modified: 2014-08-12
I am developing a metrics tracking database in excel.  I have multiple worksheets, some that need to be consolidated or eliminated, but that is not the point, as it is still a work in progress. The firs issue I am having is that one worksheet, Home, needs to be the first worksheet that is opned everytime regardless of what worksheet was editited and saved in the previous session.  I don't want users being invited to dig around in other worksheets.  I created some vb script and put it at the top of that sheet that looks like this:

Private Sub Workbook_Open()
End Sub

simple but it doesn't work.  It won't open the file to the HOME worksheet everytime.

The second issue is that I created "Main Menu" buttons to return the users back to the home worksheet.  My problem is that when they click on that button and then navigate back to that worksheet they are looking at the main menu button.  How do ensure that everytime one of the three dashboard reoprts are open, Dashboard, HBUS Dashboard and HBCAdashboard are opened they open at the top of the sheet?  Is it as simple as writitng code into each sheet activiating cell A1?
Question by:Rrave26
  • 3
LVL 50

Accepted Solution

Martin Liss earned 2000 total points
ID: 40256937
That code needs to be in ThisWorkbook, not the sheet.
LVL 50

Expert Comment

by:Martin Liss
ID: 40256944
As for your second question, yes, it's that simple or you could to this after activating the sheet


Author Closing Comment

ID: 40256974
Well that did it, thanks for helping a newbie out.
LVL 50

Expert Comment

by:Martin Liss
ID: 40257015
You're welcome and I'm glad I was able to help. We are all newbies in the beginning.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2014

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

829 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