Force Specified Sheet To Display When Workbook Opens

Jun 11, 2013

I need to set the "Sheet1" to be the sheet that always displays first, regardless of what sheet was active when last saved.

The reason is that I have a sheet with instructions on it as how to use the Workbook, including "You must Enable Macros" etc. When Macros are enabled, it's all good, as most people use a USERFORM which I have coded to set "Sheet1".Select and save their work upon closing using the USERFORM.

BUT when the advanced users modify other Sheets directly without using the USERFORM, and "SAVE" and then "Close" , the next time a user opens the Workbook (If they do not enable Macros) it opens to the sheet the advanced user Saved on. Thus killing my instructions page and putting the exact people I did not want messing around on certain sheets, on those sheets, fully bypassing the USERFORM created to avoid the problem.

I can force the workbook to switch to "Sheet1" and Save and Close, every time someone closes or EXITs, BUT I quickly realized when testing that any mistakes made are then permanent because you cant EXIT without Saving.

So. Is there a setting somewhere (Not Requiring Enabled Macros) to force a Workbook to ALWAYS open "Sheet1" first, regardless of what Sheet was last saved in the Workbook?

View 8 Replies


ADVERTISEMENT

Display Message On First Of Every Month When Workbook Opens

Nov 28, 2012

Is there a way of displaying a message box on the first of every month when a workbook opens ?

View 2 Replies View Related

Force Display Of Item In ListBox

May 29, 2009

I have a worksheet and for data validation, i do have a dropdown. This is working fine.

I am now trying to create a userform. And I feel for data integrity, I should be using a listbox on the form as well.

I have found examples of different ways to load the list, so I don't think this part will be an issue. But what I cannot find, is if the worksheet row currently has a value (say it is the third item on the list), how do I show THAT on my form?

Example, say we have a list of 10 cities.
Orlando
Tampa
San Francisco
London
Athens
Paris
Chicago
Cairo
Seattle
Atlanta

My wordsheet has the rows populated with the cutomers favorite city to visit.
For John Doe (row3) in column 5 is the city "San Francisco"

When I use my nav keys, how would I "stuff" San Francicso in to the display and still have it able to select a different city?

View 4 Replies View Related

Run When Workbook Opens

Oct 4, 2008

How do I run this I can not get it to work I keep getting errors this is the way I have it for now.

Private Sub ThisWorkbook_Open()
MY_MONTH = Month(Now()) + 5
With Sheets("Master List")
.Unprotect ("123")
.Columns("A").Locked = False
.Columns("A").Hidden = True
.Columns("T:IV").Hidden = True
.Rows("265:65536").Hidden = True
.Columns("E:Q").Locked = False
.Columns("E:Q").Hidden = True
.Columns(MY_MONTH).Hidden = False
.Columns(MY_MONTH - 1).Hidden = False
.Columns(MY_MONTH - 1).Locked = True
Dim ws As Worksheet
For Each ws In Sheets([{"JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC","2008","Read Me","Record"}])
With ws
.Protect ("123")
End With
Next
End Sub
Compile error: Expected End With

View 9 Replies View Related

Force Display Of Vertical Scroll Bars

Jul 4, 2009

I have created a form that has two textboxes on. It is used to edit existing data that is selected by a combobox on the same form.

Is there a way to force the textboxes to show scroll bars if the text exceeds the textbox height or just have them always shown?

It is difficult to distinguish on some of the data whether the data goes beyond what is visible. Without actually clicking into that textbox the scroll bars will not show.

Is this possible?

View 10 Replies View Related

Options When Workbook Opens

Jan 31, 2010

I would really like to know if there is a way that when my workbook opens if the following can happen?

- Not display the tabs (NOT "HIDE" the sheets, just not be able to view the tabs themselves)
- Go to full screen (not display ribbon)

View 6 Replies View Related

Autofilter When Workbook Opens

Jul 16, 2008

My workbooks contains 2 worksheets with data and autofilters on for each column in use.

When my workbook opens I am trying to reset the autofilters of each worksheet in the workbook and to filter the data according to one criteria in one column.

This is what I have that works to reset each worksheet but I haven't been able to figure out how to subsequently filter each worksheet.

Private Sub Workbook_Open()
Application.ScreenUpdating = False
For Each w In Worksheets
w.Unprotect
If w.FilterMode Then w.ShowAllData
w.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFiltering:=True
Next w
Application.ScreenUpdating = True
End Sub

The autofilter sits in A3 to N3 and I am trying to filter according to column M (i.e. 13th column)

View 9 Replies View Related

Add-in Opens Workbook It Was Created In

Oct 27, 2006

I've created an add-in that runs a simple macro. The problem I have is that when I run the add-in it opens the workbook I originally created it from - is this what I should expect it to do? How do I stop this from happening?

Also, do I need to have the workbook from which I created the add in located in the same place on every machine I want to use the add in on? At the moment if I move the original workbook the add-in won't work.

View 9 Replies View Related

Stop The Calculations When The Workbook Opens

Nov 24, 2009

I need to stop the calculations when the workbook opens. I have tried

View 2 Replies View Related

Workbook Automatically Opens After Closing

Jan 6, 2010

I have a workbook on a share drive that is used by multiple people. In the event that someone leaves the workbook open after using it, I have a timer function that pops up a splash screen after 4 minutes of inactivity which states, "This workbook will close in 1 minute if there is no further activity". If there is no further activity in that minute, the workbook closes.

The code works fine...unless the workbook is manually closed in that minute between the splash screen and when the timer would have closed the workbook. If that happens, the workbook closes normally and then briefly reopens and closes a minute later when the timer would have closed the workbook. Is there any code to prevent this?

View 4 Replies View Related

Calling Subs When Workbook Opens

Mar 7, 2012

I have the following code in a module that I would like to initiate when the workbook opens:

Code:
Private Declare Function GetComputerName Lib "kernel32" _
Alias "GetComputerNameA" ( _
ByVal lpBuffer As String, _
ByRef nSize As Long) As Long

Public Property Get ComputerName() As String

[Code] ........

In a worksheet, I have =compname() in cell A1 and =hdserialnumber() in A2. What is the trick to make the values in these cells appear as soon as the worksheet opens?

View 2 Replies View Related

Date Formats Incorrect When VBA Opens Workbook

Apr 29, 2008

I'm new to VBA so my i'm having alot of problems figuring out simple stuff.

Below is my script and when i run it, the dates turns out incorrect.

I noticed this only happens to dates that are before 13th of each month.

Example,

1st May 2008 ( 01/05/2008)

will turn up as

5th Jan 2008 ( 05/01/2008)

However when i manually open the file Todays trades.csv
The date looks just fine.

Is there some problem with using VBA to call up the file?

View 9 Replies View Related

When The Workbook Opens Compile Error In 2007

Jan 8, 2009

I have written a very basic Macro code to retrieve a photo off of my server. I want it to run this macro when a person has selected a certain item off of a drop down list. The problem I am having is that when I try and run the macro manually or when the workbook opens I get a an error message that reads "Compile Error: Invalid outside procedure". I click "Okay" and it highlights this portion of the code

View 5 Replies View Related

Worksheet Activate Not Happening When Workbook First Opens

May 18, 2009

I have a workbook where the sheets are all protected and I want to stop users scrolling up or across beyond the limits of the input areas.
I have used the following code (or variations of)...

Private Sub Worksheet_Activate()
Me.ScrollArea = "A1:G32"
End Sub

This works fine except that when I first open the workbook, the first sheet displayed can still be scrolled. As soon as you move to another sheet and then back again, it is then OK.

It appears that the Worksheet_Activate code does not execute when the workbook is first opened.

How do I get round this?

View 9 Replies View Related

Data Dump Query When Workbook Opens

Aug 26, 2006

I am trying to find a way to automatically do a query and dump the data into a sheet when a previously created workbook is open. I know how to get the data (use the Tools, Import External Data option to retrieve data from Access) but what I don't know is how to make it do it automatically when the workbook is open.

View 2 Replies View Related

Workbook Opens Slowly With Certain User Profiles

Aug 6, 2007

I have a work book that contains 10sheets. considering one as main sheet remaning as sub sheets. I want to open main sheet from all other remaining sheets using a common button.when I tried normally is shows compile error: Ambiguous name detected. Any other way to solve it.

View 7 Replies View Related

Workbook Automatically Opens When Opening/Closing Any Other

Mar 14, 2008

I have a problem, where every time I close or open any workbook, Excel prompts me to "Enable or Disable Macros" in one particular workbook, wether I have tried to open it or not. In the said workbook, I have a macro that automatically updates a pivot table upon selecting the worksheet where the pivot table resides.

The code for it is as follows:

Sub UpdateIt()
Dim iP As Integer
Application.DisplayAlerts = False
For iP = 1 To ActiveSheet.PivotTables.Count
ActiveSheet.PivotTables(iP).RefreshTable
Next
Application.DisplayAlerts = True
End Sub

Private Sub Worksheet_Activate()
Call UpdateIt
End Sub

There is something in the code that calls UpdateIt any time a workbook is opened, closed or selected.

View 3 Replies View Related

Automatically Open File When Another Workbook Opens

Jul 31, 2008

I am trying exactly the same things stated in here Open two workbooks at the same time as stated in the other thread's answer I would love to "just use the Workbook name IF both Workbooks are in the same folder." both files are in the same folder and this is the code that I am trying to use

Private Sub Workbook_Open()
Workbooks.Open ("toto1234.xls")

and it does not work any one explain me what I am doing wrong?

View 2 Replies View Related

Sort Column Using VBA When Workbook Opens - Runtime 91 Error

Jun 24, 2014

I'm trying to introduce some VBA code to an existing workbook that will automatically sort column A alphabetically on Sheet 2 (Summary) (excluding rows 1 & 2 as they contain headings) whenever the workbook is opened.

At the moment this code doesn't automatically run and when I run it manually I get a run-time error '91' the first time I try and when I run it for a second time (again manually) it works.

The code I've got at the moment is:

VB:
'The following code will run the sorting subroutine when the workbook is opened:
Private Sub Workbook_Open()
Call SortByWave
End Sub
'And this subroutine will enable the autofilter functionality, clear all existing filters and then filter the data on column A:
Sub SortByWave()

[Code] ......

View 5 Replies View Related

Opening Saved File Also Opens Blank Workbook

May 3, 2013

When I open any saved Excel file the saved file opens along with a blank workbook titled "Book 1". How can I make it so when I open any saved Excel file it only opens the file I want and not a new workbook every time?

View 2 Replies View Related

Excel Opens Multiple Workbooks When Opening Any Workbook?

Jan 27, 2005

The same two workbooks open when I open any other workbook. They also open up when I open Excel by itself.

View 9 Replies View Related

Workbook Open Events Fires Once. Subsequent Opens Causes Error

Oct 3, 2007

I have a program that uses the Document Open event to display a custom form. This program is being used on about 50 computers for the past 8 years with no problems. One user has a problem now. They can open the program once and the code fires. But when the user tries to open the same file a second time, the "Microsoft Excel has encountered a problem and needs to close" dialog box is displayed. The document that is recovered has no vba modules and no code in the Document open event. I've uninstalled and reinstalled Office Professional. Shut down all firewalls.

View 9 Replies View Related

Sheet Opens Fine But Behind Other Sheets?

Feb 18, 2013

I have the following macro which basiclly acts as a refresh button on a read only sheet:

Code:
Sub CloseMe()
Application.OnTime Now + TimeValue("00:00:05"), "OpenMe"
ThisWorkbook.Close SaveChanges:=True
End Sub
Sub OpenMe()
End Sub

The sheet is read only as it is used by many people and it prevents them damaging the sheet. The sheet is updated regularly and as many people who use the sheet have little excel knowledge a refresh button was required. The macro is attached to a button that when clicked, it closes the sheet, then reopens it meaning any updates I add to the sheet can then be seen by everyone else once they click the button - much like 'Refresh'.

So, the code above works fine. Click the button, the sheet closes, 5 seconds later reopens. However, when the sheet reopens, any other excel sheets that are open seem to be at the front and the sheet that has been 'reopened' is behind them. Is there anything I can do to make the macro not only close and reopen the sheet, but when it does reopen, bring it to the front so that it is visible straight away without having to click Window and then select the appropriate sheet?

View 1 Replies View Related

Double Click On A Total It Opens A New Sheet

May 15, 2009

i am working on a pivot report and it works fine so far, but the only thing i am trying to do here is when duble click on a total it opens a new sheet with the report needed but it names the sheet as sheet1 and so on (sheet2,3,4...)

is there a way when i duble click a total it automaticly names the sheet for me?

View 9 Replies View Related

Code That Copies A Range Opens Notepad Pastes The Range Opens Save Dialog And Types The File Name

Nov 6, 2009

I currently have the following code that copies a range opens notepad pastes the range opens save dialog and types the file name. The problem I have is with overwriting the existing file.

Range("A1:A202").Select
Selection.Copy
Shell "notepad.exe", vbNormalFocus
SendKeys "^V"
SendKeys "^s"
SendKeys "Total_IEDs_Hour_Of_Day_2009.xml"
SendKeys "{TAB}"
SendKeys "a"
SendKeys "{ENTER}"

Everything works fine to this point. Then it opens the do you want to overwrite dialog and I cant get it to hit yes.

View 9 Replies View Related

Force Calculation Upon Saving Workbook

Aug 2, 2006

I have this workbook that has around 12-15 worksheets. At present there is a formula that takes a arugument called "Calc". now it is set to automatic recalculate in the prefereneces. so whenever i change a sheet i have to then go to another sheet to where the calc field resides and just change the number to any number other then zero and immediately it calculates all the sheets in the workbook.

So now,I want to recalculate only one sheet at a time instead of all the sheets and also dont want to depend on the calc field of another sheet. So i made the preferences to manual and checked the box that says 'recalculte on save'. and also in the function gets () im replacling the calc to '6'. And for each sheet in vba- i wrote:

Private Sub Worksheet_Change(ByVal Target As Excel. Range)
ActiveSheet.Calculate
End Sub

But when i do alt+s to save it just saves but does not recalculate. how do i make it recalculate when it saves..

View 2 Replies View Related

Force Workbook Open New Instance

Dec 14, 2006

I've created a UserForm which the user exclusively uses to interact with a workbook.

The problem is, if the user opens another workbook, it will open in the same Excel "Process" or "Instance" and the user would have to close the UserForm in order to use the other workbook they opened.

In VBA or some obscure application setting, is there a way to force workbooks to open in a new Excel Process (or new "Instance" of Excel)?

Another possibility would be to code something in the UserForm workbook that, on Workbook Open, would start a new separate Excel process....if that's even possible (can VBA execute a system shortcut or system command string?).

View 3 Replies View Related

Force Specific Workbook Only To Fullscreen

Apr 23, 2008

I have an auto_open macro in my workbook that sets the workbook to FullScreen. However, it also makes existing open workbooks fullscreen. Is there some way that I can leave the previously open workbooks not fullscreen (i.e. so the toolbars are still visible)?

View 3 Replies View Related

Force Macros Enabled On Workbook Open?

Oct 28, 2013

I'm posting a workbook on our network that I want to enable users to go in and update. I have the workbook designed, with entry fields for the data they need to enter, and they then push "Submit" to submit the new data to a hidden tracking log within the workbook.

Many of the users will be complete Excel newbies, and although I haven't posted the workbook yet, I am trying to anticipate possible issues. The first that comes to mind is that the user opening the workbook may not have macros enabled in their version of Excel, and they will get a message, and can't perform the udpate. Is there a way to add a Workbook Open event that automatically enable macros in the workbook when they open it, even if it is for this workbook only?

View 5 Replies View Related

Force Single Instance Of Excel When Opening New Workbook From Email?

Aug 28, 2013

I have multiple buyers that use an Excel workbook containing several macros to perform edits on other workbooks they receive via email. Generally, they have the workbook containing the macros open, and they can double-click the workbooks they receive in the email messages to open them, and the macros are available from the "master" workbook.

Recently, however, some of the buyers have been getting new computers running Windows 8 and Office 10. Now when they have the "master" workbook open, and double-click the attached workbook in an email, (Outlook 10), the new workbook opens in a new instance of Excel, and as a result the macros are not available to run on the newly opened workbook.

The work around has been to right-click the attachment and save it to their desktop, and then use the File/Open command from the "master" to open the new file. This is a hassle and takes extra time.

I'm sure I am overlooking a setting somewhere that tells Excel to always open new workbooks using the same instance of Excel, (there are two people using the new systems that aren't having problems, and two that are), but for the life of me I can't find where to set these parameters.

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved